| | |
Passing from image Array in url
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Oct 2009
Posts: 8
Reputation:
Solved Threads: 0
0
#11 Oct 23rd, 2009
Airshow here is all the code fo both pages. I'm getting in message Error Console PictureBox is not defined indicating this is problem PictureBox.src=Picture[jss]
P1
P1
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<!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" /> <meta name="creator" content="Steven Broady-stevenbroady.com" /> <meta name="keywords" content="retoucher, retouching, digital, photographic, ; Beauty, Fashion, Product, Composite, Design, Color Correction, Output" /> <meta name="description" content="This site is dedicated to the Retouching of digital media for Print and Web." /> <title>Steven Broady Portfolio Propery & Assets</title> <script src="Scripts/swfobject_modified.js" type="text/javascript"></script> <script src="Scripts/buttons.js" type="text/javascript"></script> <script type="text/javascript"> // (C) 2003 by CodeLifter.com // Free for all users, but leave in this header. // Edits by Steve Broady & Chris Mondok. var Picture = new Array(); var Zipfile = new Array(); var showHot = false; Picture[1] = 'images/P1s.jpg'; Picture[2] = 'images/P2s.jpg'; Picture[3] = 'images/P3s.jpg'; Picture[4] = 'images/P4s.jpg'; Picture[5] = 'images/P5s.jpg'; Picture[6] = 'images/P6s.jpg'; Picture[7] = 'images/P7s.jpg'; Picture[8] = 'images/P8s.jpg'; Picture[9] = 'images/P9s.jpg'; Picture[10] = 'images/P10s.jpg'; Zipfile[1] = 'images/P1.zip'; Zipfile[2] = 'images/P2.zip'; Zipfile[3] = 'images/P3.zip'; Zipfile[4] = 'images/P4.zip'; Zipfile[5] = 'images/P5.zip'; Zipfile[6] = 'images/P6.zip'; Zipfile[7] = 'images/P7.zip'; Zipfile[8] = 'images/P8.zip'; Zipfile[9] = 'images/P9.zip'; Zipfile[10] = 'images/P10.zip'; var tss; var iss; var jss = 1; var pss = Picture.length-1; var preLoad = new Array(); for (iss = 1; iss < pss+1; iss++){ preLoad[iss] = new Image(); preLoad[iss].src = Picture[iss];} function download() { newwindow=window.open(Zipfile[jss],'Download zipped file'); if (window.focus) {newwindow.focus()} return false; } function zoom() { window.location.replace("stevenbroadypfpaexl2.html?jss="+jss); return false; } function control(how){ if (showHot){ if (how=="H") jss = 1; if (how=="F") jss = jss + 1; if (how=="B") jss = jss - 1; if (jss > (pss)) jss=1; if (jss < 1) jss = pss; document.images.PictureBox.src = preLoad[jss].src; }} </script> <link href="Scripts/SBsmFL.css" rel="stylesheet" type="text/css" /> </head> <div id="apDiv18"><body onload='showHot=true;self.focus();' bgcolor=#000000'>"MM_preloadImages('soundSlider3.swf','images/controller_diskback.png','images/button_3.png','images/button_2.png','images/button_4.png','images/button_1','images/controller_zoomover.png','images/controller_diskzoom.png','images/controller_playover.png','images/controller_diskplay.png','images/controller_backover.png','images/controller_diskback.png','images/controller_fwrdover.png','images/controller_diskfwrd.png','images/dlover.png','images/dl.png','images/F1s.jpg','images/F2s.jpg','images/F3s.jpg','images/F4s.jpg','images/F5s.jpg','images/F6s.jpg','images/F7s.jpg','images/F8s.jpg','images/F9s.jpg','images/F10s.jpg','images/F11s.jpg','images/F12s.jpg','images/F13s.jpg','images/F14s.jpg','images/F15s.jpg')" </div> <!--MAIN --> <!--this form allows variables to be passed--> <FORM NAME="passed"> <INPUT TYPE="hidden" NAME="variable" SIZE="35"> </FORM> <div id="apDiv1"><img id="PictureBox" src="images/P1s.jpg" value="PictureBox" width=656 height=429 /></div> <script type="text/javascript"> document.passed.variable.value = window.location var number = document.passed.variable.value function delineate(str){ theleft = str.indexOf("=") + 1; theright = str.length; if(theleft) { return(Number(str.substring(theleft, theright))); } else { return(1); } } jss=delineate(number); PictureBox.src=Picture[jss] </script> <div id="apDiv3"><img src="images/CP.png" width="977" height="768" alt="CP" /></div> <div id="apDiv4"><img src="images/portfolio.png" width="977" height="768" alt="pfmenu" /></div> <!--BUTTONS --> <div id="apDiv5"></a><a href="stevenbroadymm.html" onclick="MM_swapImage('PM','','images/button_4.png',1)" onmousedown="MM_swapImage('PM','','images/button_3.png',1)" onmouseover="MM_swapImage('PM','','images/button_2.png',1)" onmouseout="MM_swapImgRestore()"><img src="images/button_1.png" name="PM" width="125" height="125" border="0" id="PM" /></a> </div> <div id="apDiv6"><a href="stevenbroadypffbex.html" onclick="MM_swapImage('Image6','','images/button_4.png',1)" onmousedown="MM_swapImage('Image6','','images/button_3.png',1)" onmouseover="MM_swapImage('Image6','','images/button_2.png',1)" onmouseout="MM_swapImgRestore()"><img src="images/button_1.png" name="Image6" width="125" height="125" border="0" id="Image6" /></a></div> <div id="apDiv7" title="DISABLED"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','images/button_4.png',1)"><img src="images/button_1.png" name="Image19" width="125" height="125" border="0" id="Image3" /></a></div> <div id="apDiv8"><a href="stevenbroadypfdcex.html" onclick="MM_swapImage('Image8','','images/button_4.png',1)" onmousedown="MM_swapImage('Image8','','images/button_3.png',1)" onmouseover="MM_swapImage('Image8','','images/button_2.png',1)" onmouseout="MM_swapImgRestore()"><img src="images/button_1.png" name="Image8" width="125" height="125" border="0" id="Image6" /></a></div> <div id="apDiv9"><a href="stevenbroadypfccex.html" onclick="MM_swapImage('Image9','','images/button_4.png',1)" onmousedown="MM_swapImage('Image9','','images/button_3.png',1)" onmouseover="MM_swapImage('Image9','','images/button_2.png',1)" onmouseout="MM_swapImgRestore()"><img src="images/button_1.png" name="Image9" width="125" height="125" border="0" id="Image6" /></a></div> <div id="apDiv10"><a href="stevenbroadypfpaex.html" onclick="MM_swapImage('Image10','','images/button_4.png',1)" onmousedown="MM_swapImage('Image10','','images/button_3.png',1)" onmouseover="MM_swapImage('Image10','','images/button_2.png',1)" onmouseout="MM_swapImgRestore()"><img src="images/button_1.png" name="Image10" width="125" height="125" border="0" id="Image6" /></a></div> <!--CONTROLLER --> <div id="apDiv11" title="ZOOM"><a href="#" onclick="return zoom()" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','images/controller_zoomover.png',1)"><img src="images/controller_diskzoom.png" name="Image11" width="34" height="26" border="0" id="Image11" /></a></div> <div id="apDiv12" title="PLAY"><a href="stevenbroadypfpa.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','images/controller_playover.png',1)"><img src="images/controller_diskplay.png" name="Image12" width="34" height="26" border="0" id="Image12" /></a></div> <div id="apDiv13" title="BACKWARD"><a class=Controls href="#" onclick="javascript:control('B');"onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','images/controller_backover.png',1)"><img src="images/controller_diskback.png" name="Image13" width="34" height="26" border="0" id="Image13" /></a></div> <div id="apDiv14" title="FORWARD"><a class=Controls href="#" onclick="javascript:control('F');"onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image14','','images/controller_fwrdover.png',1)"><img src="images/controller_diskfwrd.png" name="Image14" width="34" height="26" border="0" id="Image14" /></a></div> <!--SOUND & DL --> <div id="apDiv15"></div> <div id="apDiv16"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="54" height="173" id="FlashID" title="VOLUME"> <param name="movie" value="soundSlider3.swf" /> <param name="quality" value="high" /> <param name="wmode" value="opaque" /> <param name="swfversion" value="6.0.65.0" /> <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. --> <param name="expressinstall" value="Scripts/expressInstall.swf" /> <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="soundSlider3.swf" width="54" height="173"> <!--<![endif]--> <param name="quality" value="high" /> <param name="wmode" value="opaque" /> <param name="swfversion" value="6.0.65.0" /> <param name="expressinstall" value="Scripts/expressInstall.swf" /> <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --> <div> <h4>Content on this page requires a newer version of Adobe Flash Player.</h4> <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p> </div> <!--[if !IE]>--> </object> <!--<![endif]--> </object> </div> <div id="apDiv17" title="DOWNLOAD"><a href="#" onclick="return download()" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image17','','images/dlover.png',1)"><img src="images/dl.png" name="Image17" width="76" height="76" border="0" id="Image17" /></a></div> <script type="text/javascript"> <!-- swfobject.registerObject("FlashID"); //--> </script> </body> </html> P2 <!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" /> <meta name="creator" content="Steven Broady-stevenbroady.com" /> <meta name="keywords" content="retoucher, retouching, digital, photographic, ; Beauty, Fashion, Product, Composite, Design, Color Correction, Output" /> <meta name="description" content="This site is dedicated to the Retouching of digital media for Print and Web." /> <title>Steven Broady Property & Assets Lg</title> <script src="Scripts/swfobject_modified.js" type="text/javascript"></script> <script src="Scripts/LGcon.js" type="text/javascript"></script> <script type="text/javascript"> // (C) 2003 by CodeLifter.com // Free for all users, but leave in this header. //Edited by Steven Broady. var Picture = new Array(); var Caption = new Array(); var showHot = false; Picture[1] = 'images/P1.jpg'; Picture[2] = 'images/P2.jpg'; Picture[3] = 'images/P3.jpg'; Picture[4] = 'images/P4.jpg'; Picture[5] = 'images/P5.jpg'; Picture[6] = 'images/P6.jpg'; Picture[7] = 'images/P7.jpg'; Picture[8] = 'images/P8.jpg'; Picture[9] = 'images/P9.jpg'; Picture[10] = 'images/P10.jpg'; var tss; var iss; var jss = 1; var pss = Picture.length-1; var preLoad = new Array(); for (iss = 1; iss < pss+1; iss++){ preLoad[iss] = new Image(); preLoad[iss].src = Picture[iss];} function control(how){ if (showHot){ if (how=="H") jss = 1; if (how=="F") jss = jss + 1; if (how=="B") jss = jss - 1; if (jss > (pss)) jss=1; if (jss < 1) jss = pss; document.images.PictureBox.src = preLoad[jss].src; }} function zoom() { document.location.replace("stevenbroadypfpaex1.html?jss="+jss); return false; } </script> <link href="Scripts/SBlgFL.css" rel="stylesheet" type="text/css" /> </head> <div id="apDiv8"><body onload='showHot=true;self.focus();' bgcolor=#000000'> <!-- "MM_preloadImages('soundSlider3L.swf','images/CP_L.png','images/controller_zoomoverL2.png','images/controller_diskzoomL2.png','images/controller_playoverL2.png','images/controller_diskplayL2.png','images/controller_backoverL2.png','images/controller_diskbackL2.png','images/controller_diskfwrdL2.png','images/controller_fwrdoverL2.png','images/P1.jpg','images/P2.jpg','images/P3.jpg','images/P4.jpg','images/P5.jpg','images/P6.jpg','images/F7.jpg','images/P8.jpg','images/P9.jpg','images/P10.jpg')" --> </div> <!--MAIN --> <!--this form allows variables to be passed--> <FORM NAME="passed"> <INPUT TYPE="hidden" NAME="variable" SIZE="35"> </FORM> <div id='apDiv1'><img src=images/P1.jpg name=PictureBox width=970 height=629 /></div> <script type="text/javascript"> document.passed.variable.value = window.location var number = document.passed.variable.value function delineate(str){ theleft = str.indexOf("=") + 1; theright = str.length; if(theleft) { return(Number(str.substring(theleft, theright))); } else { return(1); } } jss=delineate(number); PictureBox.src=Picture[jss] </script> <div id="apDiv2"><img src="images/CP_L.png" width="1024" height="768" alt="cpl" /></div> <!--CONTROLLER --> <div id="apDiv3" title="ZOOM OUT"><a href="#" onclick="return zoom()" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','images/controller_zoomoverL2.png',1)"><img src="images/controller_diskzoomL2.png" name="Image3" width="30" height="23" border="0" id="Image3" /></a></div> <div id="apDiv4" title="PLAY"><a href="stevenbroadypfpal.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','images/controller_playoverL2.png',1)"><img src="images/controller_diskplayL2.png" name="Image4" width="30" height="23" border="0" id="Image4" /></a></div> <div id="apDiv5" title="BACKWARD"><a class=Controls href="#" onclick="javascript:control('B');"onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','images/controller_backover.png',1)"><img src="images/controller_diskback.png" name="Image13" width="34" height="26" border="0" id="Image13" /></a></div> <div id="apDiv6" title="FORWARD"><a class=Controls href="#" onclick="javascript:control('F');"onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image14','','images/controller_fwrdover.png',1)"><img src="images/controller_diskfwrd.png" name="Image14" width="34" height="26" border="0" id="Image14" /></a></div> <!--SOUND & DL --> <div id="apDiv7"> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="38" height="127" id="FlashID" title="VOLUME"> <param name="movie" value="soundSlider3L.swf" /> <param name="quality" value="high" /> <param name="wmode" value="opaque" /> <param name="swfversion" value="6.0.65.0" /> <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. --> <param name="expressinstall" value="Scripts/expressInstall.swf" /> <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="soundSlider3L.swf" width="38" height="127"> <!--<![endif]--> <param name="quality" value="high" /> <param name="wmode" value="opaque" /> <param name="swfversion" value="6.0.65.0" /> <param name="expressinstall" value="Scripts/expressInstall.swf" /> <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --> <div> <h4>Content on this page requires a newer version of Adobe Flash Player.</h4> <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p> </div> <!--[if !IE]>--> </object> <!--<![endif]--> </object> </div> <script type="text/javascript"> <!-- swfobject.registerObject("FlashID"); //--> </script> </body> </html>
0
#12 Oct 23rd, 2009
darkRoom,
Firstly, in both files there is a problem at the
to
Secondly, in p2 there is a problem with the line:
Change it to :
Then in javascript, you need to change:
to
That will at least give you a fighting chance.
Airshow
Firstly, in both files there is a problem at the
<body> tag. You should change: HTML Syntax (Toggle Plain Text)
<div id="apDiv8"><body onload='showHot=true;self.focus();' bgcolor=#000000'> ...... </div>
HTML Syntax (Toggle Plain Text)
<body onload='showHot=true;self.focus();' bgcolor=#000000'> <div id="apDiv8"> ......</div>
HTML Syntax (Toggle Plain Text)
<div id='apDiv1'><img src=images/P1.jpg name=PictureBox width=970 height=629 /></div>
HTML Syntax (Toggle Plain Text)
<div id='apDiv1'><img src="images/P1.jpg" id="PictureBox" name="PictureBox" width="970" height="629" /></div>
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
PictureBox.src=Picture[jss]
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
document.getElementById('PictureBox').src = Picture[jss];
Airshow
Last edited by Airshow; Oct 23rd, 2009 at 7:37 pm.
50% of the solution lies in accurately describing the problem!
1
#13 Oct 23rd, 2009
darkRoom,
Here's a demo showing how to use my QueryParser object for passing parameters from page to page.
Three files attached (zipped together) - save all to same directory then browse demo_1.html.
Rest should be self-explanatory.
View source to see how it works.
Airshow
Here's a demo showing how to use my QueryParser object for passing parameters from page to page.
Three files attached (zipped together) - save all to same directory then browse demo_1.html.
Rest should be self-explanatory.
View source to see how it works.
Airshow
50% of the solution lies in accurately describing the problem!
![]() |
Similar Threads
- download image from the website using URL class (Java)
- Image Array Issue..... Any ideas??? (Java)
- passing array (C)
- Unable to read black and white image into array (C#)
- How to load a JPEG image file, store it in array and then save it (Visual Basic 4 / 5 / 6)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Save real-time data in client PC
- Next Thread: Is it possible detect browser process termination?
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxexample ajaxjspservlets array autoplay blackjack browser captchaformproblem checkbox child class close codes date debugger dependent developer disablefirebug dom editor element embed engine events explorer ext file firefox flash form forms game gears getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl maps marquee masterpage math matrixcaptcha media mysql object onerror onmouseoutdivproblem onreadystatechange parent passing paypal pdf php player position post programming rated redirect runtime safari scriptlets scroll search security session shopping size software solutions star stars stretch synchronous toggle tweet unicode variables web webkit webservice window wysiwyg \n





