Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
02-03-2009, 05:28 PM
|
#1
|
Member
Registered: Jun 2008
Location: St.-Petersburg, Russia
Distribution: (B)LFS, Ubuntu, SliTaz
Posts: 403
Rep:
|
Using firefox to setup D-Link modems/routers
I have a D-Link DSL-G604T router and try to setup it. I succeed to do this in IE under windoze, but whenever I try firefox, konqueror, anything else, pressing "Save and reboot" in system control page does nothing. Is there any workaround for this? I don't want to have to use Internet Exploder...
And, another question: does firefox work right with this code?
Here's the code of the frame where the button doesn't work:
Code:
<html><script>var remote_user="admin"; </script></html><html><head>
<meta http-equiv=Content-Script-Type content=text/javascript>
<meta http-equiv=Content-Style-Type content=text/css>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../html/css/alpha.css" type="text/css">
<script language="JavaScript"> var HistoryHref="home_dhcp.htm";
var HistoryItem="DHCP";
var Fimg1_1="<td width=11 valign=top height=49><img src=../html/images/"
var Fimg1_2=" width=11 height=49>";
var Fimg2_1="<td width=575 valign=top height=49><img src=../html/images/center_"
var Fimg2_2=".jpg width=575 height=49 usemap=#Map2 border=0></td>";
var Fimg3_1="<td width=20 valign=top height=49><img src=../html/images/"
var Fimg3_2=" width=19 height=49></td>";
var Flast="<td width=25 nowrap background=\"../html/images/right1.gif\"></td>";
var MTd1="<tr><td class="
var MTd2=" onclick=\"doLink('"
var MTd3="')\" vAlign=middle align=center width=133 height=60>";
var MTd="<tr><td BACKGROUND='../html/images/Title.gif' vAlign=middle align=center width=133 height=60>";
var Mfont1="<font color="
var Mfont2=" face=Arial><b>"
var Mfont3="</b></font></td></tr>";
var CHome = 1;
var CAdvanced = 2;
var CTools = 3;
var CStatus = 4;
var CHelp = 5;
var Amenu=new Array();
Amenu[0 ]=new Gitem(CHome, "Wizard", "/html/home/home_wizard.htm", 0);
Amenu[1 ]=new Gitem(CHome, "Wireless", "/html/home/wireless.htm", 0);
Amenu[2 ]=new Gitem(CHome, "WAN", "/html/home/home_wan.htm", 0);
Amenu[3 ]=new Gitem(CHome, "LAN", "/html/home/home_lan.htm", 0);
Amenu[4 ]=new Gitem(CHome, "DHCP", "/html/home/home_dhcp.htm", 0);
Amenu[5 ]=new Gitem(CHome, "DNS", "/html/home/home_dns.htm", 0);
Amenu[6 ]=new Gitem(CHome, "DynamicDNS", "/html/home/ddns.htm", 0);
Amenu[7 ]=new Gitem(CHome, "Logout", "/html/closeWin.html", 0);
Amenu[8]=new Gitem(CAdvanced, "UPnP", "/html/advanced/adv_upnp.htm", 0);
Amenu[9 ]=new Gitem(CAdvanced, "Virtual Server", "/html/advanced/portforw.htm&var:pagename=fwan&var:category=categoryG", 0);
Amenu[10]=new Gitem(CAdvanced, "Lan Clients", "/html/advanced/lanclients.htm", 0);
Amenu[11 ]=new Gitem(CAdvanced, "SNMP", "/html/advanced/adv_snmp.htm", 0);
Amenu[12]=new Gitem(CAdvanced, "TR069","/html/advanced/adv_acs.htm", 1);
Amenu[13]=new Gitem(CAdvanced, "Filters", "/html/advanced/adv_filters.htm&var:rule=0", 0);
Amenu[14 ]=new Gitem(CAdvanced, "Bridge Filters", "/html/advanced/adv_bfilters.htm&var:langrp=lan0", 0);
Amenu[15 ]=new Gitem(CAdvanced, "Routing", "/html/advanced/adv_routing.htm&var:conid=", 0);
Amenu[16 ]=new Gitem(CAdvanced, "DMZ", "/html/advanced/adv_dmz.htm", 0);
Amenu[17 ]=new Gitem(CAdvanced, "Parent Control", "/html/advanced/adv_parentctl.htm", 0);
Amenu[18 ]=new Gitem(CAdvanced, "Firewall", "/html/advanced/adv_firewall.htm", 0);
Amenu[19]=new Gitem(CAdvanced, "RIP", "/html/advanced/adv_rip.htm", 0);
Amenu[20]=new Gitem(CAdvanced, "PPP", "/html/advanced/adv_ppp.htm", 0);
Amenu[21]=new Gitem(CAdvanced, "ADSL", "/html/advanced/adv_adsl.htm", 0);
Amenu[22]=new Gitem(CAdvanced, "ATM VCC", "/html/advanced/adv_atmvcc.htm", 0);
Amenu[23]=new Gitem(CAdvanced, "QoS", "/html/advanced/adv_vlan.htm", 1);
Amenu[24]=new Gitem(CAdvanced, "Wireless Management", "/html/advanced/wireless_mang.htm", 0);
Amenu[25]=new Gitem(CAdvanced, "Wireless Performance", "/html/advanced/wireless_perf.htm", 0);
Amenu[26]=new Gitem(CAdvanced, "Logout", "/html/closeWin.html", 0);
Amenu[27]=new Gitem(CTools, "Admin", "/html/tools/tools_admin.htm", 0);
Amenu[28]=new Gitem(CTools, "Time", "/html/tools/tools_time.htm", 0);
Amenu[29]=new Gitem(CTools, "Remotelog", "/html/tools/tools_remotelog.htm", 0);
Amenu[30]=new Gitem(CTools, "System", "/html/tools/tools_system.htm", 0);
Amenu[31]=new Gitem(CTools, "Firmware", "/html/tools/tools_firmware.htm", 0);
Amenu[32]=new Gitem(CTools, "Miscellaneous", "/html/tools/tools_misc.htm", 0);
Amenu[33]=new Gitem(CTools, "Test", "/html/tools/tools_test.htm", 0);
Amenu[34]=new Gitem(CTools, "Logout", "/html/closeWin.html", 0);
Amenu[35]=new Gitem(CStatus, "Device Info", "/html/status/status_deviceinfo.htm", 0);
Amenu[36]=new Gitem(CStatus, "DHCP Clients", "/html/status/status_dhcpclients.htm", 0);
Amenu[37]=new Gitem(CStatus, "Log", "/html/status/status_log.htm", 0);
Amenu[38]=new Gitem(CStatus, "Statistics", "/html/status/status_statistics.htm", 0);
Amenu[39]=new Gitem(CStatus, "ADSL", "/html/status/status_adsl.htm", 0);
Amenu[40]=new Gitem(CStatus, "Logout", "/html/closeWin.html", 0);
Amenu[41]=new Gitem(CHelp, "Help", "/html/help/help.htm", 0);
Amenu[42]=new Gitem(CHelp, "Logout", "/html/closeWin.html", 0);
var g_FID=getFID();
function Gitem(ifolder,sname,surl,ishow)
{
this.ifolder=ifolder;
this.sname=sname;
this.surl=surl;
this.ishow=ishow;
}
function doLink(surl)
{
shref ="../cgi-bin/webcm?getpage=.."+surl;
document.location.href = shref;
}
function getFID()
{
thisurl=document.location.href;
PreSaveHref = top.GetHistoryHref();
//PreSaveHref = HistoryHref;
temp =0;
for(i=0;i<Amenu.length;i++)
{
if(thisurl.indexOf(Amenu[i].surl)!=-1)
{
temp=1;
return Amenu[i].ifolder;
}
}
if(temp == 0)
{
for(i=0;i<Amenu.length;i++)
{
if(Amenu[i].surl.indexOf(PreSaveHref)!=-1)
{
return Amenu[i].ifolder;
}
}
}
return 1;
}
function Write_Folder_Images()
{
g_FID=getFID();
if(g_FID==CHome)
Fimg1=Fimg1_1+"head_over.jpg"+Fimg1_2
else
Fimg1=Fimg1_1+"head.jpg"+Fimg1_2
Fimg2=Fimg2_1+g_FID+Fimg2_2
if(g_FID==CHelp)
Fimg3=Fimg3_1+"tail_over.jpg"+Fimg3_2
else
Fimg3=Fimg3_1+"tail.jpg"+Fimg3_2
document.write(Fimg1);
document.write(Fimg2);
document.write(Fimg3);
document.write(Flast);
}
function Write_Item_Images()
{
var sstyle="style1";
var sfont="#ffffff";
thisurl=document.location.href;
PreSaveItem = top.GetHistoryItem();
//PreSaveItem = HistoryItem;
document.write("<table border=0 cellpadding=0 cellspacing=0>");
for(i=0;i<Amenu.length;i++)
{
//init
if(Amenu[i].sname.length > 11)
//sfont="#ffffff SIZE=1"; modify by Jarry for string display size too small 2005/02/20
sfont="#ffffff SIZE=2";
else
sfont="#ffffff SIZE=2";
bgimg=" BACKGROUND='../html/images/Title.gif'"
if((Amenu[i].ifolder==g_FID) && (!Amenu[i].ishow))
{
if((Amenu[i].sname == PreSaveItem))
{
if(Amenu[i].sname.length > 11)
//sfont="#000000 SIZE=1"; modify by Jarry for string display size too small 2005/02/20
sfont="#000000 SIZE=2";
else
sfont="#000000 SIZE=2";
bgimg=" BACKGROUND='../html/images/Title_over.gif'"
}
//alert(Amenu[i].sname+" : "+sstyle);
document.write(MTd1+sstyle+bgimg+MTd2+Amenu[i].surl+MTd3);
//document.write(MTd);
document.write(Mfont1+sfont+Mfont2+Amenu[i].sname+Mfont3);
}
}
document.write("<tr><td><img src=../html/images/sp.gif width=140 heigh=10 ></td></tr></table>");
}
function doHelp()
{
doLink('/html/help/help.htm');
}
function mainTableStart()
{
document.write('<table width=795 border=0 cellspacing=0 cellpadding=0 align=center>') ;
}
function MapContent()
{
document.write('<map name=Map1>'+
'<area shape=rect coords=20,9,153,64 >'+
'</map><map name=Map2>'+
'<area shape="rect" coords="22,18,92,42" href="../cgi-bin/webcm?getpage=../html/home/home_wizard.htm" target="_self" alt="home">'+
'<area shape="rect" coords="123,18,225,42" href="../cgi-bin/webcm?getpage=../html/advanced/adv_upnp.htm" target="_self" alt="adv">'+
'<area shape="rect" coords="256,18,321,42" href="../cgi-bin/webcm?getpage=../html/tools/tools_admin.htm" target="_self" alt="tools">'+
'<area shape="rect" coords="378,18,448,42" href="../cgi-bin/webcm?getpage=../html/status/status_deviceinfo.htm" target="_self" alt="status">'+
'<area shape="rect" coords="496,18,556,42" href="../cgi-bin/webcm?getpage=../html/help/help.htm" target="_self" alt="help">'+
'</map>');
}
function logo()
{
document.write('<tr><td colspan=6 nowrap width=100%><div align=left><img src=../html/images/dsl604.jpg width="795" height="95" usemap=#Map1 border=0></div></td></tr>') ;
}
function secondRow()
{
document.write('<tr><td align=center width=140 height=40><IMG height=49 src="../html/images/device.gif" width=140 border=0></td>');
document.write('<td rowspan="2" width="25" nowrap height=100% background=../html/images/sp_line.jpg><img src="../html/images/sp.gif" width=25 heigh="10"></td>') ;
Write_Folder_Images();
document.write('</tr>');
}
function ThirdRowStart()
{
document.write('<tr><td valign=top bgColor=#c1cece>'+
'<table border=0 width=100% valign=top cellspacing=0 cellpadding=0 bgcolor=#C1CECE>'+
'<tr><td width=140 valign=top bgcolor=#C1CECE>');
}
function ThirdRowEnd()
{
document.write('</td></tr></table></td>') ;
}
function inTableStart()
{
document.write('<td colspan=2 bgcolor=#FFFFFF valign=top align=center>') ;
}
function inTableEnd()
{
document.write('</td>') ;
}
function mainTableEnd()
{
document.write('<td width="18" height=100% background=../html/images/right2.gif><img src="../html/images/sp.gif" width=18 heigh="10"></td>'+
'<td width="25" height=100% background=../html/images/right1.gif><img src="../html/images/sp.gif" width=25 heigh="10"></td>'+
'</tr>'+
'<tr>'+
'<td height="44" width=100% background=../html/images/last1.jpg> </td>'+
'<td height="44" width=100% background=../html/images/last2.jpg> </td>'+
'<td colSpan=2 height="44" width=100% background=../html/images/last3.jpg> </td>'+
'<td colspan=2 height="44" width=25 background=../html/images/last4.jpg> </td>'+
'</tr>'+
'</table>');
}
function uiDoHelp()
{
document.location.href="../cgi-bin/webcm?getpage=../html/help/help.htm";
}
</script>
</head>
<script language="JavaScript">
top.HistoryHref="tools_system.htm";
top.HistoryItem="System";
</script>
<body topmargin=20>
<script type='text/javascript'>
mainTableStart();
MapContent();
logo();
secondRow();
ThirdRowStart();
Write_Item_Images();//left area
ThirdRowEnd();
inTableStart();
</script>
<!-- main table-->
<!--bobic add for tr069 lock LOGIC-->
<script language="JavaScript" src="../html/js/jsl.js"></script>
<script language="JavaScript" src="../html/js/error.js"></script>
<script>
function uiDoOnLoad()
{
document.getElementById("uiStatus").disabled=true;
return true;
}
function aaa()
{
document.location.href="http://"+location.hostname;
}
function uiDoUpdateConfig(value)
{
if(remote_user=="user")
{
alert("sorry, you're not authorised to modify this page.");
return false;
}
if(value=="")
{ alert("You must select a file to update.");
return false;
}
else
{
document.getElementById("uiStatus").disabled=false;
document.getElementById("uiStatus").value = "Upgrade in progress, Please wait...";
document.getElementById("uiStatus").disabled=true;
//setTimeout(aaa, 40000);
document.getElementById("uiPostUpdateConf").submit();
}
}
function commandset()
{
if(remote_user=="user")
{
alert("sorry, you're not authorised to modify this page.");
return false;
}
if(confirm("Are you sure you want to restore factory defaults?") )
{
document.getElementById("commandname").value="restore";
document.getElementById("pagename").value = "../html/tools/restartmodem.htm";
document.getElementById("backip").value="restore";
document.getElementById("uiPostrestart").value="1";
document.getElementById("pppdisconnect").disabled = false;
document.getElementById("uiPostForm1").submit();
}
}
function doConfigForm()
{
if(remote_user=="user")
{
alert("sorry, you're not authorised to modify this page.");
return false;
}
document.getElementById("uiPostForm2").submit();
//top.fPanel.location.href="../cgi-bin/webcm?getpage=../html/tools/fPanelConfigSave.htm";
}
//inserted by Edward on 2004/09/15
function reboot()
{
if(remote_user=="user")
{
alert("sorry, you're not authorised to modify this page.");
return false;
}
if(confirm("Save and restart?"))
{
document.getElementById("uiPostVarName").name = "logic:command/save";
document.getElementById("pagename").value = "../html/tools/restartmodem.htm";
document.getElementById("commandname").value="restart";
document.getElementById("uiPostrestart").value="1";
document.getElementById("pppdisconnect").disabled = false;
document.getElementById("uiPostForm1").submit();
}
}
//inserted by Edward on 2004/09/15 end
function commandsetAp()
{
if(remote_user=="user")
{
alert("sorry, you're not authorised to modify this page.");
return false;
}
if(confirm("Restart AP? This will restart AP with the new configuration."))
{
document.getElementById("uiPostVarName").name = "ap:status/cli_reboot";
document.getElementById("pagename").value = "../html/tools/tools_system.htm";
document.getElementById("commandname").value="aprestart";
document.getElementById("uiPostrestart").value="0";
document.getElementById("pppdisconnect").disabled = true;
document.getElementById("uiPostForm1").submit();
}
}
</script>
<form>
<table width="540" border="0" cellspacing="0" cellpadding="0" rules = "none">
<tr>
<td colspan="4" class ="tabhead">
<div align="left">System Settings</div></td>
</tr>
<tr>
<td height="50" colspan="4" class ="tabdata">The current system settings can be saved as a file onto the local hard drive.</td>
</tr>
<tr><td><br></td></tr>
<tr>
<td colspan="4" class ="intabdataleft">
<div align="left">Save Settings To Local Hard Drive</div></td>
</tr>
<tr>
<td colspan = "4" align=left height=35>
<INPUT onclick="doConfigForm()" type=button value="Save" name=save>
<br>
</td>
</tr>
<tr>
<td colspan="4" height=10><br></td>
</tr>
</form>
<form name="Configuration" method="POST" action="../cgi-bin/firmwarecfg" enctype="multipart/form-data" id="uiPostUpdateConf">
<tr>
<td colspan="4" class ="intabdataleft">
<div align="left">Load Settings From Local Hard Drive</div>
</td>
</tr>
<tr>
<td colspan="4" class ="tabdata" align=left>
<input type = "file" size = "30" name="UploadFile" value="Browse" id="uiViewFileSelectorConf">
</td>
</tr>
<tr>
<td height="75" colspan="4" align="left" class = "formfileds">
<INPUT onclick="if(!uiDoUpdateConfig(document.getElementById('uiViewFileSelectorConf').value)) return false;" type=button value="Load" name=upgrade id="uiUpgrade" ><br>
</td></tr>
</form>
<tr>
<td colspan="4" class = "tabdata" >Note: The system has to be restarted after the configuration is restored.</td>
</tr>
<tr><td><br></td></tr>
<tr>
<td colspan="4" class = "tabdata"><font size=3 face= "Ariel">
<input type="text" name="Status" id="uiStatus" style="border-bottom:0px" style="border-top:0px" style="border-right:0px" style="border-left:0px" size="55" value=""></font>
</td>
</tr>
<!--inserted by Edward on 2004/09/15-->
<tr>
<td colspan="4" width="100%" height="28" class="intabdataleft">
Save Settings and Reboot the System.
</td>
</tr>
<tr>
<td colspan="4" class="tabhead" height="28">
<div align="left"><INPUT onclick="reboot()" type=button value="Save and Reboot" name=reboot></div>
</td>
</tr>
<!--inserted by Edward on 2004/09/15 end-->
<tr><td><br></td></tr>
<tr>
<td colspan="4" class ="intabdataleft">
<div align="left">Restore To Factory Default Settings</div></td>
</tr>
<tr>
<td colspan = "4" align=left height=35>
<INPUT onclick="commandset()" type=button value="Restore" name=restore><br>
</td>
</tr>
<tr>
<tr>
<td colspan="4" width="100%" height="28" class="intabdataleft">
Force the DSL-G604T Wireless LAN to restart.
</td>
</tr>
<tr>
<td colspan="4" class="tabhead" height="28">
<div align="left"><INPUT onclick="commandsetAp()" type=button value="Restart AP" name=restartAP></div>
</td>
</tr>
<td height="60" class="copyright"></td>
</tr>
<tr>
<td align="right">
<input name="image" type="image" src="../html/images/help_p.jpg" border="0" onClick="uiDoHelp()">
</td>
</tr>
<tr>
<td colspan="4" class="tabdata"><div align="left"></div></td>
</tr>
<form method="POST" action="webcm" target="_self" id="uiPostForm1" >
<input type="hidden" name="getpage" id="pagename" value="../html/tools/restartmodem.htm">
<input type="hidden" id="commandname" name="var:com" value="">
<input type="hidden" id="backip" name="var:ip" value="">
<input type="hidden" name="var:restart" value="1" id="uiPostrestart">
<input type="hidden" id="uiPostVarName" name="" value="">
<input type="hidden" name="logic:command/ppp_disconnect" value="" id="pppdisconnect">
</form>
<form method="POST" action="webcm" target="fPanel" id="uiPostForm2" >
<input type="hidden" name="getpage" value="../html/tools/fPanelConfigSave.htm">
<input type="hidden" name="logic:command/save" value="">
</form>
</table>
<!-- ------------ -->
<script type='text/javascript'>
inTableEnd();
mainTableEnd();
</script>
</body>
</html>
Last edited by 10110111; 02-03-2009 at 05:42 PM.
|
|
|
02-03-2009, 07:11 PM
|
#2
|
Senior Member
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873
|
Have you configured Firefox to ignore JavaScript? It looks like you need to have Firefox run some JavaScript to make that code work.
|
|
|
02-03-2009, 07:16 PM
|
#3
|
LQ Newbie
Registered: Jun 2007
Location: La Hulpe, Belgium
Distribution: Ubuntu 8.10 Intrepid
Posts: 6
Rep:
|
This might be a dumbass reply, but is it possible that you have disabled Javascript in Firefox? (Lots of other websites would also probably not work also..)
File -> Preferences -> Content -> Enable Javascript
|
|
|
02-05-2009, 01:54 PM
|
#4
|
Member
Registered: Jun 2008
Location: St.-Petersburg, Russia
Distribution: (B)LFS, Ubuntu, SliTaz
Posts: 403
Original Poster
Rep:
|
JavaScript is enabled.
Quote:
File -> Preferences -> Content -> Enable Javascript
|
It's in Edit menu, not File, at least in my distribution.
However, as i tried to disable and re-enable it, as well as just "Java", it didn't help. It seems that the page is IE-specific... Windoze version of Firefox behaves the same way as linux one. Same problem is with Google Chrome.
But Opera 9.6 windoze version does work... will now try linux version...
|
|
|
02-05-2009, 02:17 PM
|
#5
|
Member
Registered: Jun 2008
Location: St.-Petersburg, Russia
Distribution: (B)LFS, Ubuntu, SliTaz
Posts: 403
Original Poster
Rep:
|
Linux version also does work, so i don't have to use Internet Exploder. Though, as opera is closed-source, i would like to find out, why so many other browsers don't support such pages? And how to make them do... Maybe i should file a bug report to Mozilla (Google Chrome seems to use much of their code)?
|
|
|
All times are GMT -5. The time now is 05:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|