HTML - Passing Html Variable To Javascript
Hey, I'm trying to pass a variable from some HTML code to JavaScript and I'm having some trouble. For example:
HTML Code: <form name ="columnList" onchange="submitForm(this);"> Column: <c:forEach var="columnitem" items="${columns}"> <c:if test="${columnitem.name != this.document.columnList.name}"> <input type="checkbox" name="selectedColumns" id="${columnitem.name}" value="${columnitem.name}">${columnitem.name} </input> <script type="text/javascript" language ="JavaScript"> var col = document.columnList.columnitem.name; setColumns(col); </script> </c:if> </c:forEach> I'm trying to get the columnitem name from the HTML portion to the script. And I know that columnitem.name works for the check boxes. Can anyone help me out? Similar TutorialsNo. I think I got misunderstood. in my Page1.html I have this: <a href="Page2.html?ProductID='1234'>Page 2</a> So, this would open my Page2 with variable ProductID=1234. When it opens, how could my VBScript in there pick up the received variables? I have an embedded flash element and calls on a URL for it's content. Code: <embed flashvars="www.url.com"........> The URL I need I have as a variable in some javascript in the header. How can I set flashvars to be the variable I need? I want to have the user enter text, then click a "Save" button of some sort, and JavaScript save the text as a variable. I for the life of me can't figure out how. HELP!!! Okay. I use a javascript that detects the browser and if it is Internet Explorer it sets IE=true;. Later I need to check wether it's true or false, but the problem is that the rest of the site is html. So my question is, how do I detect in html wether a javascript variable is true or false? I really need some help on this one. I'm new to all this stuff, but I am working on creating a simple drop-down menu that must pass a variable to an xml script (VXML to be exact). All files will be on a linux web host. Any suggestions on what to use for the drop-down menu web page (php, java script, etc)? Depending on what selection is chosen in the drop down, a different value need to be assigned to the variable. Thanks! Hi folks - right then, think im being thick here lol <input type="hidden" name="amount" value="myvariable2"> I have a variable say called myvariable1, how do I pass that into the above so that value becomes equal to it? ie myvariable2 = myvariable1 myariable2 also needs to be/become numeric. Any help appreciated, ta karl Hi all, i'm new to xml but i was wondering if the following is possible: I have a html document with some tabs. And when i click on a tab it opens a xml document. In the xml document is a link to xsl sheet with a variable and i want to change that variable with the value of the link in html document. Does some one nows how? html link: <a href="#t1" target= "t1" title="[link title]">11</a> <div class="sliderkit-news" id=t1><iframe name="t1" width="100%" height="800" src=wo.xml></iframe> xml variable <xsl:variable name= "line" select="'11'"/> The number 11 should come form the a href in the html doc. Also the following is possible fill the variable with a drop down menu: <xsl:variable name= "line"> <select> <option value="'11'">11</option> <option value="'12'">12</option> <option value="'13'">13</option> </select> </xsl:variable> I want to fill the variable with a drop down selection. and then use the variable in the document. What i do is opening the xml en then it generates a display based on the xsl sheet. i hope some one can help me. This htm file contains no errors, but the "amount" value is not passed to the form (does not appear on the shopping cart). If I type in the value for the amount in the input field, everything works fine, but I need the amount to be dependent on the item_name selected. The shopping cart just shows this error message "Some required information is missing or incomplete." Any suggestions? <HTML><HEAD><TITLE>PlaceOrder Page</TITLE> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META http-equiv=Pragma content=no-cache> <META http-equiv=Expires content="Thu, 1 Jan 1970 01:00:00 GMT"> <META content="MSHTML 6.00.2900.2802" name=GENERATOR> <script language="javascript"> function pricecheck(list) { var selectedproduct = list.options[list.selectedIndex].value; var amount = ""; if (selectedproduct == "5050_Sink") { amount .value = "67.00"; } else if (selectedproduct == "6040_Sink") { amount .value = "66.00"; } } </script> </HEAD> <BODY text=#000000 bgColor=#ffffff background="white"> <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"> <BR><font size=4 color="red"><B>FIRST</B></font><font size=4 color="blue"><B> - Select the Sink Model</B></font><BR><BR> <select name="item_name" onChange="pricecheck(this)"> <option value="not selected">Select a Sink</option> <option value="5050_Sink">5050 Sink</option> <option value="6040_Sink">6040 Sink</option> </select> <BR><BR><font size=4 color="red"><B>SECOND</B></font><font size=4 color="blue"><B> - Select the Color</B></font><BR><BR> <select name="item_number"> <option value="not selected">Select a Color</option> <option value="Earth_Fossil">Earth Fossil</option> <option value="Earth_Soil">Earth Soil</option> <option value="Earth_Dirt">Earth Dirt</option> </select> <BR><BR><BR> <table border="0" cellspacing="0" cellpadding="0"> <tr> <input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" alt="Add to Cart"> <input type="hidden" name="add" value="1"> <input type="hidden" name="cmd" value="_cart"> <input type="hidden" name="business" value="bobsmithatyahoo.com"> <input type="hidden" name=" amount "> <input type="hidden" name="no_note" value="1"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="bn" value="PP-ShopCartBF"> </td></tr> </form> </table> </BODY></HTML> Hi, am trying to show a page in a HTML <iframe> but before loading that page I want to set a variable value. I tried following: <iframe src="slgrid/ccustomer.php?id=" <? echo $cat; ?> "width="100%" height="100""></iframe> but can not get the value of id using $_GET['id'] Any other ideas are also welcome please. I am a little new in PHP and HTML. Any help in this regard will be appreciated. Thanks and regards, Hi My first post here, so I hope it's a good one! I have a form which I want a javascript function to be able to manipulate the action= line. the reason I want this is so I can manipulate the subject line. the javascript looks like this: Code: <script language="JavaScript"> function getMAILTO(){ var mailto = "andy.plumb@conwy.gov.uk?subject=EN$(FORMNO)"; alert(mailto) document.Enrolment.action = mailto; } </script> I have put the alert in so i can see what the variable produces. The form line looks like this: HTML Code: <form action="mailto:javascript:getMAILTO()" method="post" > Hi Everyone I have a problem with my form in that I have an html page with a dropdown list. I need the value selected to be passed to another html file. However I need this done with html and not javascript/css/asp etc. As an e.g. of what I have: <form name="connect" action="trace.php" method="get"> <select name="sites"> <option selected option value="http://www/connect.php">Choose A Site</option> <option value="http://10.20.12.50" name="Site1">Site1</option> <option value="http://10.20.12.55" name="Site2">Site2</option> <option value=http://10.20.12.40" name="Site3">Site3</option> </select> <br><br> <input type="Submit" value="Traceroute"> </form> So if the user selects site2 I need the name (or value) from the option field sent to trace.php and from the trace.php website i need to retrieve the value selected from the above. Can someone please help me by telling me how to do this? At the moment I cannot retrieve the value from the trace.php site. I have used $_POST & $_GET, but neither seem to work and I am not sure what I am doing wrong. TIA Hi, I have trouble to pass arguments to the main class in applets. There are three different class within the Main class in the applets, Easy.class, Intermediate.class and Expert.class. In HTML, how can I pass arguments to applets so that they can interact with each other by calling the three classes from the main class? The codes a HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Jigsphere Main</title> <link href="../../../Users/User/Documents/JigSphere.com/MainPage.css" rel="stylesheet" type="text/css" /> <!--[if IE]> <style type="text/css"> /* place css fixes for all versions of IE in this conditional comment */ .twoColElsLtHdr #sidebar1 { padding-top: 30px; } .twoColElsLtHdr #mainContent { zoom: 1; padding-top: 15px; } /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */ </style> <![endif]--> <style type="text/css"> <!-- .style1 { font-family: Geneva, Arial, Helvetica, sans-serif; color: #000000; background-color: #3366FF; } body { background-color: #00CCFF; } --> </style> <script src="../../../Users/User/Documents/JigSphere.com/Scripts/AC_RunActiveContent.js" type="text/javascript"></script> </head> <body class="twoColElsLtHdr"> <div id="container"> <div id="header"> <h1 align="center" class="style1"><img src="Logo.gif" alt="logo" width="354" height="84" /><!-- end #header --> </h1> </div> <div id="sidebar1"> <h3> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','306','height','309','title','Logo','src','../../../Users/User/Documents/JigSphere.com/bluesphere','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','../../../Users/User/Documents/JigSphere.com/bluesphere' ); //end AC code </script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="306" height="309" title="Logo"> <param name="movie" value="../../../Users/User/Documents/JigSphere.com/bluesphere.swf" /> <param name="quality" value="high" /> <embed src="../../../Users/User/Documents/JigSphere.com/bluesphere.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="306" height="309"></embed> </object> </noscript> </h3> <!-- end #sidebar1 --></div> <div align="center"> <p><img src="Easy button.png" alt="easy" width="264" height="64" /></p> <p> <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats --> <img src="Intermediate button.png" alt="intermediate" width="264" height="64" /></p> <p><img src="Expert button.png" alt="expert" width="264" height="64" /></p> <p><img src="High Scores button.png" alt="high scores" width="264" height="64" /></p> <p align="center"><img src="Quit.png" alt="quit" width="113" height="65" /><br class="clearfloat" /> </p> </div> <div id="footer"> <p align="center">JigSphere™</p> <!-- end #footer --></div> <!-- end #container --></div> </body> </html> I want to embed the codes in the image button.png, once user click any of the button, the requested class will be passed by applets to HTML and displaying the page in HTML. This is what I got.. HTML Code: <HTML> <HEAD> <TITLE> JigSphere Main Page </TITLE> </HEAD> <BODY> <APPLET CODE = "TheMain.class" WIDTH = "1250" HEIGHT = "650"> <PARAM NAME="easy" value ="JigSphereEasy.class"> <PARAM NAME="intermediate" value ="JigSphereInt.class"> <PARAM NAME="expert" value ="JigSphereEx.class"> </applet> Is it correct? what should I put then in the param name? and the value? I need to pass a variable from a form to my url. here is the html: Code: <form action="gdform.asp" method="post" id="form1"> Would you like to be notified of coming promotions?<br /> <label for="radiobutton">Yes</label> <input name="_Send_Promos" type="radio" value="radiobutton"id="contactYes" /> <label for="label">No</label> <input name="_No Promos" type="radio" value="radiobutton" id="contactNo" /> <br /> <br /> <input type="text" name="_Name" size="40" maxlength="42" /> <br /> <input type="text" name="_Company" size="40" maxlength="42" /> <br /> <input type="text" id="_Email" name="_Email" size="40" maxlength="42" /> <br /> <input type="text" name="_Phone" size="40" maxlength="42" /> <input name="submit" type="submit" value="Send" onclick="getEmail()" /> <input name="reset" type="reset" value="Clear" /> </form> now here is my java: Code: <script type="text/javascript"> function getEmail() { alert("alert"); var emailAddress if(document.form1._Send_Promos.checked == true) { emailAddress = document.getElementById("_Email").value; document.write('<input type="hidden" name="redirect" value="http://www.myalbano.com/thankyou.aspx?EmailAddress="'+ emailAddress'">"'); } else { document.write('<input type="hidden" name="redirect" value="http://www.myalbano.com/thankyou.aspx"'); } } </script> problem is that the javascript never gets executed. I do not get the alert. I have put it at the top, in the html, and at the bottom of the page. None has worked. what is it that I need to do to get the html to see the java? Hi all... i am using the following HTML to load a flash video on a iweb page. Is there a way i create links on my page to different flash files on my web server and have it play that video? I would think i have to set the 'embed src' and 'value' to a variable that's changed every time a new link is clicked on the page but how do i setup up that variable? <object classid="clsid27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/ flash/swflash.cab#version=6,0,40,0" border="0" width="800" height="600"><param name="movie" value="http://web.mac.com/youriDisk/docs/flash.swf"><param name="quality" value="High"><embed src="http://web.mac.com/youridisk/docs/flash.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="800" height="600"></object> Hi, I have what I think is a simple problem, but I am not sure how to solve it (because I am fairly new at php): I want to use a google map link where it will show the destination address. This link uses the iFrame component. Now, on my site, I want the user to enter his/her departing address, and what is entered will be input into a php variable $address. I am still experimenting, but I wanted to replace the google link that is in the iFrame (say it is www.googlemaps.com/location1+location2+location3) I want to replace "location1" with $address. The thing is, when i try to put a php variable inside an html coding, it won't work. I am trying to integrate it without having to use <?php ?>, but rather in the body of the html. I also tried <?=$address?> but this also did not work. Could anyone help me out? it seems very simple. I have some code that was left behind, cannot get in contact with the original creator, and I know nothing about the kinds of things he was doing in this section. No documentation either. Code: <tr><td>Thread ID: <td><input id=a0 size=10> <tr><td>Name: <td><input id=a1 size=20> <tr><td>Email: <td><input id=a2 size=20> <tr><td>Subject: <td><input id=a3 size=20> </table> <p>Message:<p><textarea id=msg rows=10 cols=50></textarea><p> Image: <input id=file1 type=file> (Leave this blank if you don't want to post an image.)<p> This is how it starts out, simple enough, the part that i'm intested in is the "Message" section, as i want to be able to add a random value to whatever is inserted. The message part enters a loop at some point of the code. Code: '"resto"\r\n\r\n'+t+s+ '"name"\r\n\r\n'+a1.value+s+ '"email"\r\n\r\n'+a2.value+s+ '"sub"\r\n\r\n'+a3.value+s+ '"com"\r\n\r\n'+msg.value+s+ '"upfile"; filename="'+fso.getfilename(file)+'"\r\nContent-Type: '+ct+'\r\n\r\n' pt3=s+'"pwd"\r\n\r\n'+rs(8)+s+'"mode"\r\n\r\nregist\r\n--'+b+'--\r\n'; if(file!="")pt3=rs(20)+pt3; wsh.currentdirectory=fso.getspecialfolder(2); var f1=fso.createtextfile("part1.tmp"); var f3=fso.createtextfile("part3.tmp"); f1.write(pt1); f3.write(pt3); f1.close(); f3.close(); if(file!="")fso.copyfile(file,"part2.tmp"); if(file=="")wsh.run("cmd /c copy /b part1.tmp+part3.tmp request.txt",0,1); else wsh.run("cmd /c copy /b part1.tmp+part2.tmp+part3.tmp request.txt",0,1); var a=new ActiveXObject("ADODB.Stream"); a.mode=3; a.type=1; a.open(); a.loadfromfile(fso.getabsolutepathname("request.txt")); x.send(a); a.close(); i think this is where something happens to the message... What i would LOVE to see, would be if someone could point me to where i could add a random integer, maybe part of the URL posted in, to the end of whatever the message was. Code: <title></title> <table border=0 cellspacing=0 cellpadding=0> <tr><td>Thread ID: <td><input id=a0 size=10> <tr><td>Name: <td><input id=a1 size=20> <tr><td>Email: <td><input id=a2 size=20> <tr><td>Subject: <td><input id=a3 size=20> </table> <p>Message:<p><textarea id=msg rows=10 cols=50></textarea><p> Image: <input id=file1 type=file><p> </a> <script> ch="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""); function rs(n){ str=""; for(i=0;i<n;i++) str+=ch[Math.floor(Math.random()*ch.length)]; return str; } fso=new ActiveXObject("Scripting.FileSystemObject"); wsh=new ActiveXObject("WScript.Shell"); x=new ActiveXObject("Microsoft.XMLHTTP"); v=0; posted1=""; function post(){ if(msg.value==""){alert("no message");v=0;} else{ try{ t=a0.value; if(t==""){ x.open("get","http://url-goes-here.html?"+rs(20),0); x.setrequestheader("Referer:","http://url-goes-here.html"); x.setrequestheader("Accept-Language","en-us"); x.send(); t=x.responsetext.match(/<span id="nothread\d+/g); t=t[Math.floor(Math.random()*t.length)].match(/\d+/g)[0]; } b=rs(20); file=file1.value; ext=fso.getextensionname(file).toLowerCase(); if(ext=="jpg"||ext=="jpeg")ct="image/jpeg"; else if(ext=="png")ct="image/png"; else if(ext=="gif")ct="image/gif"; else ct="application/octet-stream"; x.open("post","http://url-goes-here.php",0); x.setrequestheader("Content-Type","multipart/form-data; boundary="+b); x.setrequestheader("Referer:","http://url-goes-here/"+t+".html"); x.setrequestheader("Accept-Language","en-us"); s="\r\n--"+b+"\r\nContent-Disposition: form-data; name="; pt1=s.substr(2,s.length-2)+'"MAX_FILE_SIZE"\r\n\r\n2097152'+s+ '"resto"\r\n\r\n'+t+s+ '"name"\r\n\r\n'+a1.value+s+ '"email"\r\n\r\n'+a2.value+s+ '"sub"\r\n\r\n'+a3.value+s+ '"com"\r\n\r\n'+msg.value+s+ '"upfile"; filename="'+fso.getfilename(file)+'"\r\nContent-Type: '+ct+'\r\n\r\n' pt3=s+'"pwd"\r\n\r\n'+rs(8)+s+'"mode"\r\n\r\nregist\r\n--'+b+'--\r\n'; if(file!="")pt3=rs(20)+pt3; wsh.currentdirectory=fso.getspecialfolder(2); var f1=fso.createtextfile("part1.tmp"); var f3=fso.createtextfile("part3.tmp"); f1.write(pt1); f3.write(pt3); f1.close(); f3.close(); if(file!="")fso.copyfile(file,"part2.tmp"); if(file=="")wsh.run("cmd /c copy /b part1.tmp+part3.tmp request.txt",0,1); else wsh.run("cmd /c copy /b part1.tmp+part2.tmp+part3.tmp request.txt",0,1); var a=new ActiveXObject("ADODB.Stream"); a.mode=3; a.type=1; a.open(); a.loadfromfile(fso.getabsolutepathname("request.txt")); x.send(a); a.close(); r=x.responsetext.match(/\d+/g); r=r[r.length-2]; if(file=="")w=31; else w=46; posted1+="Successfully posted in thread "+r+". Waiting "+w+"<br>"; posted.innerHTML=posted1; w*=1000; } catch(e){ posted1+="Failed to post for some reason. <br>"; posted.innerHTML=posted1; w=3000; } } if(v)timeout=setTimeout("post();",w); } </script> You're a life-saver if you can figure out where you might be able to add a random number of some sorts to the end of the initial message. Hello, I'm a newbie in HTML Development. Could someone please help me on this? I'm calling another HTML ie. http://www.mywebsite.com/Page2.html?ID=1234 Basically, I'm on Page1.html and there's a link there that I'm referencing to call Page2 but passing a variable of ID=1234. How can I use this ID=1234 in Page2's vbscript? In my Page2.html, I have a vbscript section and I want to get the passed variable. How can I do this? What should I put in: <script type="text/vbscript"> strProductID= ??????? ... </script> Thanks in advance! Hi All, I am new to html programming. I am having problem in sharing a variable between 3 html pages. I tried googling for the solution but couldn't get the right one. A brief about my problem is... 1. I have 3 html pages, 1.htm, 2.htm & 3.htm 2. I have a variable var1 in 1.htm which is set to 0. 3. 1.htm will open 2.htm and 3.htm 4. 3.htm will update the var1 variable declared in 1.htm to 1 on onunload event. 5. 2.htm will check the status of var1 for value 1, if yes it will navigate to next page. I have pasted the code below for 1.htm, 2.htm & 3.htm respectively. Can anyone please help me in this regard. Thanks in advance. Regards, tux09. ---------------------------------------------------------------- 1.htm -------- <html> <head> <title>main</title> <script type="text/javascript"> var checkPopUpClosed = 0; function delayed_redirect(){ window.open('3.htm','SaveAs','height=250,width=640,resizable=0,directions=0,location=0,toolbar=0,men ubar=0,scrollbars=0'); } </script> </head> <body ><!-- masthead --> <table border="0" cellpadding="0" cellspacing="0" summary="."> <tr><td ><h1>Main</h1></td></tr> </table> <FORM method="post" name="mainForm" ACTION="2.htm"> <table cellspacing="0" cellpadding="0" border="0" summary="." > <tr> <td class="rightContentPane"> <br><br> <div class="pad10"> <div> <INPUT type="submit" name="Back" accesskey="b" alt="Back" VALUE="< Back"> <INPUT type="submit" name="Finish" accesskey="s" alt="Save As" onclick="javascript:delayed_redirect();" VALUE="Save As"> <INPUT type="submit" name="Cancel" accesskey="c" alt="Cancel" VALUE="Cancel"> </div> </td> </tr> </table> <div> <INPUT type="hidden" name="Hide" VALUE="18489"> <INPUT type="hidden" name="shVariable" VALUE="0"> </div> </FORM> </div> </body> </html> ---------------------------------------------------------------------------------------- 2.htm -------- <html> <head> <title>second</title> <meta http-equiv="refresh" content="5;" /> <script type="text/javascript"> //if (1 == document.mainForm.checkPopUpClosed.value) var temp = 0; if (1 == top.mainForm.checkPopUpClosed) alert("Close received = ");//+document.mainForm.checkPopUpClosed.value); function checkClick() { //temp = top.parent.item.forms("mainForm","checkPopUpClosed"); //temp = parseInt(parent.checkPopUpClosed);//.document.frames.item("shVariable"); //temp = document.getElementById("mainForm"); //temp.parentElement(shVariable); //temp = document.mainForm.checkPopUpClosed.value; alert("temp = "+temp); } </script> </head> <body onclick="checkClick();"><!-- masthead --> <tr><td ><h1>Second</h1></td></tr> <FORM method="post" name="secondForm" > <table cellspacing="0" cellpadding="0" border="0" summary="." > <tr> <td > <div > <table width="200" border="3" cellspacing="0" cellpadding="0" summary="."> <tr> <td style="text-align:center;"> <br/> <h3>Result</h3> <br/> In progress. <br/><br/><br/> </td> </tr> </table> </div> </td> </tr> </table> </FORM> </div> </body> </html> ------------------------------------------------------------------------------- 3.htm -------- <html> <head> <title>third</title> <script type="text/javascript"> function doClose(){ if (window.opener && !window.opener.closed) { window.opener.location.href="1.htm"; } } function delayed_close() { setTimeout("window.close();",7000); } function delayed_Openclose() { delayed_close(); setTimeout ("doClose();", 6900); } function doAbnormal_Close() { var temp2 = 0;// = document.getElementById("mainForm"); top.mainForm.checkPopUpClosed = 1; temp2 = top.mainForm.checkPopUpClosed; //temp2 = open.document.forms("mainForm", "0").checkPopUpClosed = 1; //temp2 = document.getElementById("mainForm").checkPopUpClosed.value; alert("temp2 = "+temp2); //alert("checkPopUpClosed 1 = "+top.mainForm.checkPopUpClosed); //document.mainForm.checkPopUpClosed.value = true; //alert("checkPopUpClosed 2 = "+document.mainForm.checkPopUpClosed); } function checkClick() { var temp3 = 0; //temp3 = if(window.opener.closed); alert("temp3 = "+temp3); } </script> </head> <body onunload="doAbnormal_Close();" onclick="checkClick();"> <FORM method="post" name="thirdForm" ACTION="2.htm"> <table cellspacing="0" cellpadding="0" summary="."> <tr> <td style="text-align:center;"> <br /><br /> <h3>Checking</h3> <br /><br /> To submit this request click "Save As" <br /><br /> <INPUT type="submit" name="Save" accesskey="s" alt="ok" onclick="javascript:delayed_close();" VALUE="Save As"> <br /><br /> </td> </tr> </table> </FORM> <script type="text/javascript"> </script> </body> </html> --------------------------------------------------------------------------------------------- I have a webpage that has about 100 links on it. All of them point to the same 900+ page document, but go to a different page. This document changes, so that a page may get added prior to a certain page. because of that, I'd prefer not to have to hardcode each of the 100 page numbers. I'd like to have a rolling reference page, so that if the first link started on page 150, and the second link would go to page 155, then I'd like for it to be #page=var1+5. Here is the hardcoded version that I've started creating: <a href="http://.../PDF_file.pdf#page=155">O15_test_setup .... page 5-16</a> the #page=155 would be indicative of the second link above. I'd like to set up an array that i can use in the href tag for each of these links, that will allow me to goto the correct page. and if a page gets added, then it would only take one change to update the file. I've also looked for a way to open the PDF file, and search for the "O15_test_setup" text, but haven't found a way to do that. My thought of how it could be done is with javascript, declare the array, and fill in the array. Something like array(1,1) = first link text (http://...pdf_file.pdf#page=150) array(1,2) = first link displaytext (O14_test_setup) array(2,1) = second link text (http://...pdf_file.pdf#page=155) array(2,2) = first link displaytext (O15_test_setup) Then in the HTML part of the file, have something like <a href = array(1,1);array(2,1)> What is the correct way to do this? I'm trying to create a page that refreshes a frame at a random interval - I've used Javascript to come up with that random interval (minimum of 5, max of 10), but the page refreshes using a meta tag in the head. I'm obviously not getting any results - help anyone? Following is the code: Code: <html> <head> <script language="JavaScript"> var now = new Date(); var secs = now.getSeconds(); var raw_random_number = Math.random(secs); var random_number = Math.round(raw_random_number * (5)+5); <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta http-equiv="refresh" content="5"> </script> <title>New Page 1</title> </head> <FRAMESET COLS="*,1"> <FRAME SRC="http://htmlcodetutorial.com"> <FRAME> </FRAMESET> </HTML> |