Data call using apend in controller - html

Hy. I'm learning about Laravel
im using append to enter data in select option
here is my append code
if($('.type').val()=="MAG") {
$('.tools').empty();
$('.tools').append('<?php echo $MAGRES ?>');
$(".tools").prop('disabled', false);
$('.level').empty();
$('.level').append('<?php echo $mlevel ?>');
$(".level").prop('disabled', false);
}
if($('.type').val()=="WAG") {
$('.tools').empty();
$('.tools').append('<?php echo $WAGRES ?>');
$(".tools").prop('disabled', false);
$('.level').empty();
$('.level').append('<?php echo $flevel ?>');
$(".level").prop('disabled', false);
}
Here is my controller
$openM =\App\eventcontroller::where('eventcontroller.eventID','=',$id)->where('type','MAG')->first();
$openF =\App\eventcontroller::where('eventcontroller.eventID','=',$id)->where('type','WAG')->first();
$mlevel='<option value="">-- Choose Levels --</option>';
$flevel='<option value="">-- Choose Levels --</option>';
if($openM->OneO == 1 || $openM->OneA == 1 || $openM->OneB == 1 || $openM->OneC == 1 || $openM->OneD == 1){$mlevel=$mlevel.'<option value="Level 1">Level {{$event->onename}} </option>';}
if($openM->TwoO == 1 || $openM->TwoA == 1 || $openM->TwoB == 1 || $openM->TwoC == 1 || $openM->TwoD == 1){$mlevel=$mlevel.'<option value="Level 2">Level {{$event->twoname}}</option>';}
if($openM->ThreeO == 1 || $openM->ThreeA == 1 || $openM->ThreeB == 1 || $openM->ThreeC == 1 || $openM->ThreeD == 1){$mlevel=$mlevel.'<option value="Level 3">Level {{$event->threename}}</option>';}
if($openM->FourO == 1 || $openM->FourA == 1 || $openM->FourB == 1 || $openM->FourC == 1 || $openM->FourD == 1){$mlevel=$mlevel.'<option value="Level 4">Level {{$event->fourname}}</option>';}
if($openM->FiveO == 1 || $openM->FiveA == 1 || $openM->FiveB == 1 || $openM->FiveC == 1 || $openM->FiveD == 1){$mlevel=$mlevel.'<option value="Level 5">Level {{$event->fivename}}</option>';}
if($openM->FigO == 1 || $openM->Fig1 == 1 ||$openM->Fig2 == 1){$mlevel=$mlevel.'<option value="FIG">FIG</option>';}
if($openF->OneO == 1 || $openF->OneA == 1 || $openF->OneB == 1 || $openF->OneC == 1 || $openF->OneD == 1){$flevel=$flevel.'<option value="Level 1">Level {{$event->onename}}</option>';}
if($openF->TwoO == 1 || $openF->TwoA == 1 || $openF->TwoB == 1 || $openF->TwoC == 1 || $openF->TwoD == 1){$flevel=$flevel.'<option value="Level 2">Level {{$event->twoname}}</option>';}
if($openF->ThreeO == 1 || $openF->ThreeA == 1 || $openF->ThreeB == 1 || $openF->ThreeC == 1 || $openF->ThreeD == 1){$flevel=$flevel.'<option value="Level 3">Level {{$event->threename}}</option>';}
if($openF->FourO == 1 || $openF->FourA == 1 || $openF->FourB == 1 || $openF->FourC == 1 || $openF->FourD == 1){$flevel=$flevel.'<option value="Level 4">Level {{$event->fourname}}</option>';}
if($openF->FiveO == 1 || $openF->FiveA == 1 || $openF->FiveB == 1 || $openF->FiveC == 1 || $openF->FiveD == 1){$flevel=$flevel.'<option value="Level 5">Level {{$event->fivename}}</option>';}
if($openF->FigO == 1 || $openF->Fig1 == 1 ||$openF->Fig2 == 1){$flevel=$flevel.'<option value="FIG">FIG</option>';}
there is no problem to display the options
but its print text :
'{{$event->onename}}' not data from $event->onename
i want it shows $event->onename data from database.
can anyone help me? thank you

Because you are using Blade syntax in your controller file, that is why it is displaying {{$event->onename}} instead of its actual value.
You can do like
if($openM->OneO == 1 || $openM->OneA == 1 || $openM->OneB == 1 || $openM->OneC == 1 || $openM->OneD == 1){
$mlevel= $mlevel."<option value=\"Level 1\">Level {$event->onename} </option>";
}
Or
if($openM->OneO == 1 || $openM->OneA == 1 || $openM->OneB == 1 || $openM->OneC == 1 || $openM->OneD == 1){
$mlevel = $mlevel.'<option value="Level 1">Level '.$event->onename.'</option>';
}

Related

Shorten if Statement Actionscript 3

I just started learning actionscript and I'm wondering how could I shorten this if statement
if (txtInputTemp.charAt(track - 1) == "a" || txtInputTemp.charAt(track - 1) == "b" || txtInputTemp.charAt(track - 1) == "c" || txtInputTemp.charAt(track - 1) == "d" || txtInputTemp.charAt(track - 1) == "e" || txtInputTemp.charAt(track - 1) == "f" || txtInputTemp.charAt(track - 1) == "g" || txtInputTemp.charAt(track - 1) == "h" || txtInputTemp.charAt(track - 1) == "i" || txtInputTemp.charAt(track - 1) == "j" || txtInputTemp.charAt(track - 1) == "k" || txtInputTemp.charAt(track - 1) == "l" || txtInputTemp.charAt(track - 1) == "m" || txtInputTemp.charAt(track - 1) == "n" || txtInputTemp.charAt(track - 1) == "o" || txtInputTemp.charAt(track - 1) == "p" || txtInputTemp.charAt(track - 1) == "q" || txtInputTemp.charAt(track - 1) == "r" || txtInputTemp.charAt(track - 1) == "s" || txtInputTemp.charAt(track - 1) == "t" || txtInputTemp.charAt(track - 1) == "u" || txtInputTemp.charAt(track - 1) == "v" || txtInputTemp.charAt(track - 1) == "w" || txtInputTemp.charAt(track - 1) == "x" || txtInputTemp.charAt(track - 1) == "y" || txtInputTemp.charAt(track - 1) == "z" || txtInputTemp.charAt(track - 1) == "." || txtInputTemp.charAt(track - 1) == "'" || txtInputTemp.charAt(track - 1) == "-" || txtInputTemp.charAt(track - 1) == " ") { }
Any help is appreciated.
It can rewrite a-z to range specification.
somechar>="a" && somechar<="z"
But I have no idea how to shorten these symbols.
== "."
== "'"
== "-"
== " "
var somechar:String = txtInputTemp.charAt(track - 1);
if ((somechar>="a" && somechar<="z")||somechar == "."||somechar == "'"||somechar == "-"||somechar == " ")
{
// do something
}
Working Example: http://wonderfl.net/c/A9Hv
Option2: Use array.indexOf(char) == -1 or not.
var someArray: Array = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z",".","'","-"," "];
var somechar:String = txtInputTemp.charAt(track - 1);
if (someArray.indexOf(somechar) != -1)
{
// Do something
}

How can I calculated dates from another column and another table?

I have 2 tables:
table 1:
|| *handtool_id* || *maintenance_interval_value* || *unit_unit_id* || *handtool_last_date_of_maintenance* || *handtool_next_date_of_maintenance* ||
|| 1 || 1 || 5 || 2014-11-07 || ||
|| 2 || 1 || 6 || 2014-11-07 || ||
|| 3 || 4 || 4 || 2014-11-07 || ||
table 2:
|| *unit_id* || *unit_name* || *unit_value* || *unit_parent_id* ||
|| 1 || Minute || 1 || 1 ||
|| 2 || Hour || 60 || 1 ||
|| 3 || Day || 1440 || 1 ||
|| 4 || Week || 10080 || 1 ||
|| 5 || Month || 32767 || 1 ||
|| 6 || Year || 525949 || 1 ||
What is the right syntax for calculating the handtool_next_date_of_maintenance from maintenance_interval_value and from unit_unit_id? Thank you
I have to say, it's wrong, and very confusing to change your question like this. You should rollback this question to the one Andrew Jones answered Nov 3, accept and upvote his answer, and then ask a new question.
That said, this would appear to get you something like what you're after (although how you arrived at figures of 32767 and 525949 is beyond me !?!)
SELECT *
, h.handtool_last_date_of_maintenance
+ INTERVAL h.maintenance_interval_value
* u.unit_value MINUTE x
FROM handtools h
JOIN units u
ON u.unit_id = h.unit_unit_id;
Whenever you insert to B, you want to insert into A. This is a good use of a MySQL trigger. I'm assuming an auto increment for web_content_id.
DELIMITER //
CREATE TRIGGER new_language_id
AFTER INSERT ON B
FOR EACH ROW
BEGIN
INSERT INTO A (web_content_const, i18n_language_codes_i18n_language_codes_id)
VALUES ('SERVICES_HEADING', #i18n_language_codes_id),
('SERVICES_MAIN_TEXT', #i18n_language_codes_id),
('SERVICES_1_HEADING', #i18n_language_codes_id),
('SERVICES_1_TEXT', #i18n_language_codes_id);
END;//
DELIMITER ;

How to Create Maps and Keys?

I'm trying to give names to some variables. But I'm getting error TypeError: Error #1010
var squareArr:Object = {
b1: {
piece: wn1_txt,
pieceLoc: {
x: "47",
y: "297"
}
},
c1: {
piece: wb1_txt,
pieceLoc: {
x: "97",
y: "297"
}
},
...
addChild(squareArr.b1.piece);
addChild(squareArr.c1.piece);
...
var i:int;
if ((mvB.charAt(mvB.length - 2) == "a") && (mvB.charAt(mvB.length - 1) == "1") || (mvB.charAt(mvB.length - 2) == "a") && (mvB.charAt(mvB.length - 1) == "3") || (mvB.charAt(mvB.length - 2) == "a") && (mvB.charAt(mvB.length - 1) == "5") || (mvB.charAt(mvB.length - 2) == "a") && (mvB.charAt(mvB.length - 1) == "7") || (mvB.charAt(mvB.length - 2) == "b") && (mvB.charAt(mvB.length - 1) == "2") || (mvB.charAt(mvB.length - 2) == "b") && (mvB.charAt(mvB.length - 1) == "4") || (mvB.charAt(mvB.length - 2) == "b") && (mvB.charAt(mvB.length - 1) == "6") || (mvB.charAt(mvB.length - 2) == "b") && (mvB.charAt(mvB.length - 1) == "8") || (mvB.charAt(mvB.length - 2) == "c") && (mvB.charAt(mvB.length - 1) == "1") || (mvB.charAt(mvB.length - 2) == "c") && (mvB.charAt(mvB.length - 1) == "3") || (mvB.charAt(mvB.length - 2) == "c") && (mvB.charAt(mvB.length - 1) == "5") || (mvB.charAt(mvB.length - 2) == "c") && (mvB.charAt(mvB.length - 1) == "7") || (mvB.charAt(mvB.length - 2) == "d") && (mvB.charAt(mvB.length - 1) == "2")
|| (mvB.charAt(mvB.length - 2) == "d") && (mvB.charAt(mvB.length - 1) == "4") || (mvB.charAt(mvB.length - 2) == "d") && (mvB.charAt(mvB.length - 1) == "6") || (mvB.charAt(mvB.length - 2) == "d") && (mvB.charAt(mvB.length - 1) == "8") || (mvB.charAt(mvB.length - 2) == "e") && (mvB.charAt(mvB.length - 1) == "1") || (mvB.charAt(mvB.length - 2) == "e") && (mvB.charAt(mvB.length - 1) == "3") || (mvB.charAt(mvB.length - 2) == "e") && (mvB.charAt(mvB.length - 1) == "5") || (mvB.charAt(mvB.length - 2) == "e") && (mvB.charAt(mvB.length - 1) == "7") || (mvB.charAt(mvB.length - 2) == "f") && (mvB.charAt(mvB.length - 1) == "2") || (mvB.charAt(mvB.length - 2) == "f") && (mvB.charAt(mvB.length - 1) == "4") || (mvB.charAt(mvB.length - 2) == "f") && (mvB.charAt(mvB.length - 1) == "6") || (mvB.charAt(mvB.length - 2) == "f") && (mvB.charAt(mvB.length - 1) == "8") || (mvB.charAt(mvB.length - 2) == "g") && (mvB.charAt(mvB.length - 1) == "1") || (mvB.charAt(mvB.length - 2) == "g") && (mvB.charAt(mvB.length - 1) == "3")
|| (mvB.charAt(mvB.length - 2) == "g") && (mvB.charAt(mvB.length - 1) == "5") || (mvB.charAt(mvB.length - 2) == "g") && (mvB.charAt(mvB.length - 1) == "7") || (mvB.charAt(mvB.length - 2) == "h") && (mvB.charAt(mvB.length - 1) == "2") || (mvB.charAt(mvB.length - 2) == "h") && (mvB.charAt(mvB.length - 1) == "4") || (mvB.charAt(mvB.length - 2) == "h") && (mvB.charAt(mvB.length - 1) == "6") || (mvB.charAt(mvB.length - 2) == "h") && (mvB.charAt(mvB.length - 1) == "8")) {
for(i=1; i<=8; i++) {
for( num=97; num<105; num++){
if (squareArr[String.fromCharCode(num) + i].piece == wb1_txt) {
oldSquare = String.fromCharCode(num) + i;
}
}
}
newSquare = mvB.charAt(mvB.length - 2) + mvB.charAt(mvB.length - 1);
currentPiece = Object(squareArr[oldSquare]).piece;
TweenLite.to(currentPiece, 0.3, {x:squareArr[newSquare].x, y:squareArr[newSquare].y, ease:Linear.easeNone, onComplete:isMovingFunction});
...
Check what items you access in squareArr, do they defined, etc.
For example, check your iteration logic:
var squareName:String;
for (i = 1; i <= 8; i++) {
for (num = 97; num < 105; num++) {
squareName = String.fromCharCode(num) + i;
if(squareName in squareArr){
if (squareArr[squareName].piece == wb1_txt) {
oldSquare = String.fromCharCode(num) + i;
}
}else{
trace("There is no " + squareName + " property");
}
}
}

Why does e.preventDefault() and return false not work on keydown event?

I just want to cancel the keydown event when I type the key except a number,
for this, I did the following :
function handleNum(obj){
var e = window.event;
var flag = true;
if( ( e.keyCode >= 48 && e.keyCode <= 57 ) ||
( e.keyCode >= 96 && e.keyCode <= 105 ) ||
e.keyCode == 8 ||
e.keyCode == 46 ||
//e.keyCode == 110 ||
//e.keyCode == 190 ||
e.keyCode == 37 ||
e.keyCode == 39 ||
e.keyCode == 35 ||
e.keyCode == 36 ||
e.keyCode == 9
) {
flag = true;
} else {
alert('You can type only a number!');
console.log("doesn't return?");
e.preventDefault();
flag = false;
}
console.log(flag);
return flag;
}
html :
<input type="text" onkeydown="return handleNum(this);" />
but It doesn't work, how can I solve this problems?
I have no idea why e.preventDefault() don't work in any browser.
Event is undefined, You can pass it like this
<script>
function handleNum(e,obj){
if (!e) var e = window.event;
var flag = true;
if( ( e.keyCode >= 48 && e.keyCode <= 57 ) ||
( e.keyCode >= 96 && e.keyCode <= 105 ) ||
e.keyCode == 8 ||
e.keyCode == 46 ||
//e.keyCode == 110 ||
//e.keyCode == 190 ||
e.keyCode == 37 ||
e.keyCode == 39 ||
e.keyCode == 35 ||
e.keyCode == 36 ||
e.keyCode == 9
) {
flag = true;
} else {
alert('You can type only a number!');
console.log("doesn't return?");
e.preventDefault();
flag = false;
obj.value = obj.value.replace(/\D/g, '');
}
console.log(flag);
return flag;
}
</script>
<input type="text" onKeyDown="return handleNum(event,this);" />
Fiddle
Here is a code that will return false if the key pressed is not a number.
Use the keypress event instead of keydown.
$(fieldid).keypress(function(e) {
if (e.which != 8 && e.which != 0 && (e.which<48 || e.which>57)) {
return false;
}
});

Iframe does not render properly

So I'm attempting to run a webpage that shows security camera feeds for a client. However it does not render properly at all and only shows the background. I have a feeling it has to do with a limitation of the iframe tag, since using other iframe testing gadgets online I get the same results. Other clients are using camera feeds with a different interface and my solution works fine for them. Are there any alternatives to iframe?
edit: The page actually renders perfectly fine when being visited directly, and not through an iframe.
edit2: By popular request here is the source for the security feed site. I did not post my iframe code, since no matter what I use for iframe it will not display.
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta http-equiv="expires" content="-1">
<title>:::</title>
<script language="JavaScript" src="/js/lgSource.js"></script>
<script language="JavaScript" src="/js/data_init.js"></script>
<script language="javascript" src="/js/AVUtility.js"></script>
<script language="JavaScript">
var d = document ;
d.write( "<frameset frameSpacing=0 rows='37,*' frameBorder='no' >" ) ;
d.write( " <frame name='ban' src='' scrolling='no'>" ) ;
d.write( " <frameset frameSpacing=0 frameBorder='no' cols='*,195'>" ) ;
d.write( " <frame name='main' src='home.htm' scrolling='auto'>" ) ;
d.write( " <frame name='left' src='' noResize scrolling='no'>" ) ;
d.write( " </frameset>" ) ;
d.write( "</frameset>" ) ;
d.write( "<noframes><body><p>no frame</p></body></noframes>" ) ;
var httpObj,httpObj2,httpObj3;
//alert("Code in NFS. H264 \n\n charset=utf-8");
//top.dt.user.SupportLG = "ENGLISH&CHINESE&"
loadSupportLanguage();
//loadUserPwd();
function loadSupportLanguage()
{
httpObj3 = createHttpRequestObj();
requestData = "http://"+getURL()+"/cgi-bin/nobody/Machine.cgi?action=get_capability";
httpObj3.onreadystatechange = updSL;
requestCgiParam(httpObj3, requestData);
}
function updSL()
{
if (httpObj3.readyState == 4 && httpObj3.status == 200)
{
var objStr = new Object();
objStr.strSrc = httpObj3.responseText;
if (GetCgiParam(objStr,"Language.Support=") == 1)
if (objStr.strGet != "")
top.dt.user.SupportLG = objStr.strGet;
loadUserPwd();
}
}
function loadUserPwd()
{
httpObj = createHttpRequestObj();
requestData = "http://"+getURL()+"/cgi-bin/guest/UserInfo.cgi?action=query";
httpObj.onreadystatechange = updUserPwd;
requestCgiParam(httpObj, requestData);
}
function updUserPwd()
{
if (httpObj.readyState == 4 && httpObj.status == 200)
{
var objStr = new Object();
objStr.strSrc = httpObj.responseText;
if (GetCgiParam(objStr, "Username=") == 1)
top.dt.user.username = objStr.strGet;
if (GetCgiParam(objStr, "Password=") == 1)
top.dt.user.password = objStr.strGet;
loadLogin();
}
}
function loadLogin()
{
httpObj2 = createHttpRequestObj();
requestData = "http://"+getURL()+"/cgi-bin/guest/Login.cgi?rnd="+Math.random();
httpObj2.onreadystatechange = updLogin;
httpObj2.open("get", requestData, true);
httpObj2.send(null);
}
function updLogin()
{
if (httpObj2.readyState == 4 && httpObj2.status == 200)
{
var objStr = new Object();
objStr.strSrc = httpObj2.responseText;
if (GetCgiParam(objStr,"Server-Language=") == 1)
{
if(objStr.strGet.toUpperCase() == "CHINESE")
top.dt.user.language = 2;
else if(objStr.strGet.toUpperCase() == "GREEK")
top.dt.user.language = 3;
else
top.dt.user.language = 1;
}
if (GetCgiParam(objStr, "Video-System=") == 1)
top.dt.user.VideoSystem = objStr.strGet;
if (GetCgiParam(objStr, "User-Level=") == 1)
top.dt.user.ulevel = objStr.strGet;
if (GetCgiParam(objStr, "Product-ShortName=") == 1)
{
if(objStr.strGet == "V_Indep")
top.dt.user.IndepFlag = true;
}
//top.dt.user.NatSupport = true;
//top.dt.user.PosSupport = true;
if (GetCgiParam(objStr, "Capability=") == 1)
{
tmpStr = objStr.strGet.split(",");
if(tmpStr.length==4){
if(parseInt(tmpStr[3],16)&0x01)
top.dt.user.isDvrPtz = true;
if(parseInt(tmpStr[2],16)&0x01)
top.dt.user.DvrHaSupport = true; // HA
if(parseInt(tmpStr[2],16)&0x02)
top.dt.account.NotifySys = true; //3G Notify
if(parseInt(tmpStr[2],16)&0x04)
top.dt.user.NatSupport = true; //NAT
if(parseInt(tmpStr[2],16)&0x08)
top.dt.user.RfidSupport = true; //RFID
if(parseInt(tmpStr[1],16)&0x01)
top.dt.user.PosSupport = true; //POS
}
}
if (GetCgiParam(objStr, "Product-ID-Minor=") == 1)
{
top.dt.user.ProductID = objStr.strGet;
var pid = objStr.strGet;
// Video Channel (default: 4 ch)
if(pid == "787" || pid == "718" || pid == "616" || pid == "757" || pid == "677" || pid == "678" || pid == "DG1648" || pid == "798"){
top.dt.user.dvrCh = 16;
}
else if (pid == "785" || pid == "608" || pid == "716" || pid == "755" || pid == "675" || pid == "676" || pid == "DG0824" || pid == "796"){
top.dt.user.dvrCh = 8;
}
else if (pid == "783" || pid == "604" || pid == "604F" || pid == "714" || pid == "724" || pid == "DG0412" || pid == "763" || pid == "764" || pid == "760A" || pid == "761A" || pid == "041"){
top.dt.user.dvrCh = 4;
}
else{
top.dt.user.dvrCh = 4; /* default 4 ch */
}
// Audio Channel
if(pid == "DG0824" || pid == "608" || pid == "DG1648" || pid == "616" || pid == "718" || pid == "757" || pid == "755" || pid == "675" || pid == "676" || pid == "677" || pid == "678" || pid == "724" || pid == "764" || pid == "673" || pid == "674" || pid == "683" || pid == "796" || pid == "798"){
top.dt.user.soundCh = 4;
}
else if (pid == "732E" || pid == "DG0412" || pid == "714"){
top.dt.user.soundCh = 2;
}
else if (pid == "733" || pid == "944" || pid == "945" || pid == "946" || pid == "311" || pid == "321" || pid == "202" || pid == "212" || pid == "604F" || pid == "203" || pid == "671" || pid == "672" || pid == "681"){
top.dt.user.soundCh = 1;
}
else{
top.dt.user.soundCh = 0;
}
//Top-Page
if(top.dt.user.ulevel != "SUPERVISOR" || pid == "203" || pid == "763")
top.dt.user.topSrc = "/top2.htm";
else
top.dt.user.topSrc = "/top.htm";
//show Left-Page
if(pid == "311" || pid == "321"){
top.dt.user.leftSrc = "/left_ipcam.htm";
top.dt.user.confSrc = "/left_ipcam_config.htm";
top.dt.user.ProductType = "IP CAMERA";
top.dt.user.isAutomoveSupport = true;
}
else if(pid == "203"){
top.dt.user.leftSrc = "/left_ipcam_h264.htm";
top.dt.user.ProductType = "IP CAMERA";
}
else{
if(pid == "763"){
top.dt.user.leftSrc = "/left_home763.htm";
}else if(pid == "798" || pid == "796"){
top.dt.user.leftSrc = "/left_home16ch.htm";
}
else{
top.dt.user.leftSrc = "/left_home.htm";
}
top.dt.user.confSrc = "/left_config.htm";
top.dt.user.ProductType = "DVR";
}
//show Title
if(pid == "764" || pid == "671" || pid == "672" || pid == "673" || pid == "674" || pid == "681" || pid == "683" || pid == "203" || pid == "796" || pid == "798" || pid == "041"){
top.dt.user.MediaType = "H264";
document.title = "H264 "+ top.dt.user.ProductType;
}
else
document.title = "MPEG4 "+ top.dt.user.ProductType;
if(top.dt.user.ulevel == "SUPERVISOR")
if(top.dt.user.ProductType == "DVR")
loadRecImageSize();
else
chkNatFirstUse();
else
loadMainPage();
}
}
}
function loadRecImageSize()
{
httpObj = createHttpRequestObj();
var requestData = "http://"+getURL()+"/cgi-bin/user/Config.cgi?action=get&category=DVR.Record.*";
httpObj.onreadystatechange = updRecImageSize;
requestCgiParam(httpObj, requestData);
}
function updRecImageSize()
{
if (httpObj.readyState == 4 && httpObj.status == 200)
{
var objStr = new Object();
objStr.strSrc = httpObj.responseText;
if (GetCgiParam(objStr,"ImageSize=") == 1){
top.dt.user.DVR_Record_ImageSize = objStr.strGet;
chkNatFirstUse();
}
}
}
function chkNatFirstUse()
{
httpObj = createHttpRequestObj();
var requestData = "http://"+getURL()+"/cgi-bin/user/Config.cgi?action=get&category=Network.NAT.*";
httpObj.onreadystatechange = updNatFirstUse;
requestCgiParam(httpObj, requestData);
}
function updNatFirstUse()
{
if (httpObj.readyState == 4 && httpObj.status == 200)
{
var objStr = new Object();
objStr.strSrc = httpObj.responseText;
var FirstUseNatFlag = false;
if (GetCgiParam(objStr,"FirstUse=") == 1)
if(objStr.strGet == "YES")
FirstUseNatFlag = true;
if (GetCgiParam(objStr,"Hostname=") == 1)
top.dt.user.NatName = objStr.strGet;
if(FirstUseNatFlag)
showNatFirstUseWeb();
else
loadMainPage();
}
}
function showNatFirstUseWeb()
{
top.ban.location.replace("/top2.htm");
top.left.location.replace("/left_empty.htm");
top.main.location.replace("/combo/nat_firstuse.htm");
}
function loadMainPage()
{
top.dt.user.mainSrc = "/home.htm";
top.ban.location.replace(top.dt.user.topSrc);
top.left.location.replace(top.dt.user.leftSrc);
}
</script>
</html>
The page actually renders perfectly
fine when being visited directly, and
not through an iframe.
The only thing I can think of that the page has a frame busting technique.
You can read a little about it here.
I can't help you much more without the code!