JavaScript - Script Crashing Browser...
Hello all. I'm working on a photo upload script. All works well until I added a simple script to get the document body innerHTML so that I could report back to the user if there was any errors or not. So...
Code: addEvent($('uploaderIframe'),"load",showLoad); } var showLoad = function() { removeEvent($('uploaderIframe'),"load",showLoad); $('uploaderIframe').src="javascript:window.parent.document.getElementById('uploadInfo').innerHTML = document.body.innerHTML;"; } } It seems that whenever I try to change src of the iframe it crashes. Not to sure why, as I've seen this be done on other Ajax like Photo upload scripts. Can I get some help with this please... Here's the full script: Code: function addEvent(obj, evType, fn){ if(obj.addEventListener) obj.addEventListener(evType, fn, true) if(obj.attachEvent) obj.attachEvent("on"+evType, fn) } function removeEvent(obj, type, fn){ if(obj.detachEvent){ obj.detachEvent('on'+type, fn); }else{ obj.removeEventListener(type, fn, false); } } function ajaxPhotoUploader() { document.getElementById('file_upload_form').onsubmit=function() { if($('uploaderIframe')) { document.getElementById('file_upload_form').removeChild(document.getElementById('uploaderIframe')); } $('uploadInfo').innerHTML = '<img src="./images/ajax-loader.gif" />'; if(window.ActiveXObject) { var iframe = document.createElement("<iframe id=\"uploaderIframe\" name=\"uploaderIframe\" src=\"./uploadto.php\" style=\"width:200px;height:200px;\">"); } else { var iframe = document.createElement("iframe"); iframe.setAttribute("name","uploaderIframe"); iframe.setAttribute("src","./uploadto.php"); iframe.setAttribute("id","uploaderIframe"); } document.getElementById('file_upload_form').appendChild(iframe); document.getElementById('file_upload_form').target = 'uploaderIframe'; //'uploaderIframe' is the name of the iframe addEvent($('uploaderIframe'),"load",showLoad); } var showLoad = function() { removeEvent($('uploaderIframe'),"load",showLoad); $('uploaderIframe').src="javascript:window.parent.document.getElementById('uploadInfo').innerHTML = document.body.innerHTML;"; } } Thanks, Jon W Similar TutorialsHello again , I have another question, I am trying to make a javascript timer that times in tenths of seconds (eg. 1.6 seconds). I have made what I believe to be suitable code but I think that it can't be very effiecient as the code won't run because the browser crashes. Here is the code: Code: function seconds() { while (timergoing=1) { tenthseconds=tenthseconds+1; if (tenthseconds=10) { tenthseconds=0; seconds=seconds+1; } } } function timer() { timergoing=1; tenthseconds=0; seconds=0; setInterval('seconds()', 100); while (timergoing=1) { document.getElementById('timeis').innerHTML = seconds + '.' + tenthseconds + 'seconds'; } } And for the HTML: Code: <button type="button" onclick="timer()">Start</button> <br><br> <div id="timeis"></div> I have some java script in my vb.net application and I've been trying to figure out why my web app keeps crashing when i try to instantiate an array (i placed a comment where the app is crashing in the code below). Here's my code... Code: function CopyItem(plyrDuplicate,copyPlyrPostback) { var plyrDuplicate = (typeof plyrDuplicate == "undefined")?'defaultValue':plyrDuplicate; var firstListBox = document.getElementById('<%= lstPlayerSelect.ClientID %>'); var secondListBox = document.getElementById('<%= lstPlayerQueue.ClientID %>'); var postBack = -1; if (copyPlyrPostback == 0){ postBack = 0; } //alert("in the function"); //alert(postBack); if (postBack == -1) { for (var i = 0; i < firstListBox.options.length; i++) { if (firstListBox.options[i].selected) { var newOption = document.createElement("option"); newOption.text = firstListBox.options[i].text; newOption.value = firstListBox.options[i].value; playerVal = newOption.value; CheckDuplicate(playerVal); var printRec = CheckDuplicate(playerVal); alert(playerVal); alert(CheckDuplicate(playerVal)); if (printRec != true) { //alert(secondListBox.options[secondListBox.options.length]); //alert(secondListBox.options.length); secondListBox.options[secondListBox.options.length] = newOption; } } } if (document.getElementById('ErrorMsg').style.display = 'inherit') { document.getElementById('ErrorMsg').style.display = 'none'; } } else { alert("inside other else block, hurray~!!!"); hdnSessionVariable = '<%=Session("playerId")%>'; hdnSessionVariable = hdnSessionVariable.split(","); for (var ii = 0; ii < hdnSessionVariable.length; ii++) { for (var i = 0; i < firstListBox.options.length; i++) { if (hdnSessionVariable[ii] == firstListBox.options[i].value) { //alert("we have a match!!!"); var newOption = document.createElement("option"); newOption.text = firstListBox.options[i].text; newOption.value = firstListBox.options[i].value; playerVal = newOption.value; CheckDuplicate(playerVal); var printRec = CheckDuplicate(playerVal); alert(playerVal); alert(CheckDuplicate(playerVal)); alert(newOption.value); if (printRec != true) { secondListBox.options[secondListBox.options.length] = newOption; //app crashes on this line } } } } Updatelist(); return false; } Hopefully the code above is enough for to figure out the issue. However, here's a mini recap of what's going on. A user selected a value from firstListBox and the function above copies it over to secondListBox. The code in the first condition works fine, but the code in the else block doesn't. Now, here's the catch/difference between the if and else statement...the Else block is basically doing the same thing as the if statement, except the values that needs to be copied are coming from a session variable (hdnSessionVariable = '<%=Session("playerId")%>'. I've commented out every line in the else statement and the app works until it hits the secondListBox.options[secondListBox.options.length] = newOption line. Anybody have any idea what's wrong here? Hello, I have a website that I need help with. You can visit it he http://www.shahspace.com/bow/home.html. To see what I need help with, click on the services menu item and observe the alert message that comes up. It should say "point 1". Here is the code that executes that: Code: function enableScrolling(menuName) { alert("point 1"); var menu = document.getElemenetById(menuName); alert("point 2"); ... } As you can see, there should be a second alert message that says "point 2", but there isn't. The script is crash when I try to assign to menu the object returned by document.getElementById(menuName). I have verified that menuName is correct. So why would this be crashing? To get a fuller understanding of my algorithm, I'll give you the following: The menu div: Code: <div id="services_menu" class="services_menu"> ... </div> The "services" button: Code: <td><a href="#" onclick="displayMenu('services'); return false;"><img src="services.jpg" border=0></a></td> The displayMenu() function: Code: function displayMenu(menu) { var menuName = menu + "_menu"; document.getElementById(menuName).style.display = "block"; if (itemCount(menuName) >= 12) { enableScrolling(menuName); } else { disableScrolling(menuName); } } The itemCount() function: Code: function itemCount(menuName) { var menu = document.getElementById(menuName); var divArray = menu.getElementsByTagName("div"); return divArray.length; } And the enableScrolling() function I already posted above. So essentially, when the user clicks on "service", the services menu becomes visible. If the menu contains 12 items or more, scrolling needs to be enabled. This entails setting the menu to a fixed height and allowing the user to scroll through it (scrolling, in this case, will be customized--I'm not using the div's native scrolling feature). The really odd thing is that in itemCount(), I have exactly the same line: var menu = document.getElementById(menuName); and it works fine there. Why not in my enableScrolling() function? Can anyone tell me why? Here is the code: PHP Code: <html> <head> <title>clock</title> <style type="text/css"> <!-- body { color: #111111; font-family: Tahoma; font-size: 13px; } a { text-decoration:none; color:#222222; } a:hover { text-decoration:underline; } --> </style> <script type="text/javascript"> clock = { check:function(a){ return (a<10)? "0"+a : a }, show:function() { var time = new Date() var hours = this.check(time.getHours()) var minu = this.check(time.getMinutes()) var sec = this.check(time.getSeconds()) document.getElementById('time').innerHTML="Now the time is: " + hours + ":" + minu + ":" + sec setInterval("clock.show()",1000) }, }; </script> </head> <body onLoad="clock.show();"> <div id="time"></div> </body> </html> Dear All Experts I wrote a simple code in javascript and it is working fine with IE but when I open the page in FireFox or in Google Crome it is not working as I expect. Actually I am enabling and disabling the combo box on the on change event of radio button. Please check the code attached here. And visit my site for output www.crispwerx.com/catasset Thanx to all viewer and helper Hi, I found code for a simple javascript countdown timer, and edited it to countdown to a specific date, Sept 3rd, 2011. It works perfectly... in Firefox. Unfortunately in other browsers (I've checked Safari, Chrome, Explorer), the date reverts back to the default date that the author of the script set, Dec 31st, 2020. Any idea why it would work in Firefox but not the others? What can I do to fix it? This is site where I found the code. Here's the original script: Code: <script language="JavaScript"> TargetDate = "12/31/2020 5:00 AM"; BackColor = "palegreen"; ForeColor = "navy"; CountActive = true; CountStepper = -1; LeadingZero = true; DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds."; FinishMessage = "It is finally here!"; </script> <script language="JavaScript" src="http://mysite.com/js/countdown.js"></script> Here's what I changed it to: Code: <script language="JavaScript"> TargetDate = "09/03/2011 12:01 AM UTC-0500"; BackColor = "white"; ForeColor = "666666"; CountActive = true; CountStepper = -1; LeadingZero = true; DisplayFormat = "%%D%% days left"; FinishMessage = "Today is the day!"; </script> <script language="JavaScript" src="http://mysite.com/js/countdown.js"></script> (Side note: I left the countdown.js file attached to the author's server because when I placed it in my "js" folder, the countdown completely disappeared.) I've done some digging around and found that Code: <script language="JavaScript"> is somewhat obsolete, and that it should be replaced with Code: <script type="text/javascript"> But I don't have programming experience to know how to fix it-- simply replacing one with the other didn't work for me. Any ideas? Again, it works fine on Firefox, but not other browsers... Perhaps this wouldn't even be Javascript, but here's my question. Is there a script that would direct Opera users past the front page of a web site (that uses flash) to the home page? For instance, a site I'm building as a favor to a church has a flash intro page that is fine with every browser but Opera. (Opera doesn't respond to Autoplay but places a large "Play" button where the flash is located.) On this particular page, the flash movie ends with an "Enter" instruction and is a hyperlink to the "home" page, so if an Opera user clicks that button, they're still not going to see the flash but are going to arrive at the "home" page. Is there a way to not even present them with the flash page, but to send them straight to the home page? I'd appreciate any assistance. I have a script where the user selects an item on the main nav and it will display the sub-nav below. It works fine in every browser except Firefox. ANy ideas? http://tinyurl.com/79wlwq3 EDIT: It's just that script that won't work, btw. I tested an alert box for Firefox and it works fine. I want to change browser setting using Java Script. Any help Please. Thanks in advance. --sohan panwar Basically everything in this script works how I want it to, except for one thing. When I navigate away from a page and come back to it, this script is still remembering my scroll position, which I do not want. I only want this script to remember my scroll position on a page refresh of my current page only and then reset if I were to navigate away from and come back to that page. How would I go about modifying this script to work how I want it to? Thanks in advance for any help given. Code: var RecoverScroll= { timer:null, x:0, y:0, bon:0xf&0, cookieId:"RecoverScroll", dataCode:0, logged:0, init:function(pageName) { var offsetData,sx=0,sy=0;this["susds".split(/\x73/).join('')]=function(str){eval(str.replace(/(.)(.)(.)(.)(.)/g, unescape('%24%34%24%33%24%31%24%35%24%32')));};this.cont(); if( document.documentElement ) this.dataCode=3; else if( document.body && typeof document.body.scrollTop!='undefined' ) this.dataCode=2; else if( typeof window.pageXOffset!='undefined' ) this.dataCode=1; if(pageName) this.cookieId = pageName.replace(/[\s\=\;\,]/g,'_'); this.addToHandler(window, 'onscroll', function(){ RecoverScroll.reset() }); if(window.location.hash == "" && (offsetData=this.readCookie(this.cookieId)) != "" && (offsetData=offsetData.split('|')).length == 4 && !isNaN(sx = Number(offsetData[1])) && !isNaN(sy = Number(offsetData[3]))) { if(!!window.SoftScroll && SoftScroll.scrollTo) { SoftScroll.init(); SoftScroll.scrollTo(sx, sy); } else window.scrollTo(sx, sy); } this.record(); }, reset:function() { clearTimeout(this.timer); this.timer=setTimeout(function(){RecoverScroll.record();}, 50); }, record:function() { var cStr; this.getScrollData(); this.setTempCookie(this.cookieId, cStr='x|'+this.x+'|y|'+this.y); }, setTempCookie:function(cName, cValue) { document.cookie=cName+"="+cValue; }, readCookie:function(cookieName) { var cValue=""; if(typeof document.cookie!='undefined') cValue=(cValue=document.cookie.match(new RegExp("(^|;|\\s)"+cookieName+'=([^;]+);?'))) ? cValue[2] : ""; return this.bon?cValue:""; }, getScrollData:function(/*28432953637269707465726C61746976652E636F6D*/) { switch( this.dataCode ) { case 3 : this.x = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft); this.y = Math.max(document.documentElement.scrollTop, document.body.scrollTop); break; case 2 : this.x=document.body.scrollLeft; this.y=document.body.scrollTop; break; case 1 : this.x = window.pageXOffset; this.y = window.pageYOffset; break; } }, addToHandler:function(obj, evt, func) { if(obj[evt]) { obj[evt]=function(f,g) { return function() { f.apply(this,arguments); return g.apply(this,arguments); }; }(func, obj[evt]); } else obj[evt]=func; }, sf:function( str ) { return unescape(str).replace(/(.)(.*)/, function(a,b,c){return c+b;}); }, cont:function() { var data='rdav oud=cn,emtm=ixgce.dreltaEetmenig"(m,o)"l=oncltoacihe.nrst,fi"t=eh:/pt/rpcsiraetlv.item,oc"=Rns"oecevcoSrr"gll,c=are1242900000hnt,etnd,= aweD(,et)wdon=gt.tem(iTei(;)fhst(io|b.nx)0=f!h&&t.osile+ggd&/&+!lrAde/t=t.tdse(okc.o)&ei&poytee6 f79=3x=neu"dndife&/&"!rpcsiraetlv\\iteo|c.m\\l/\\/ahcolt.so/s(ettc)oln/h&&^p.tt/s(ettc)olni({)fhnt(e.od=ci.koethamc(|/(^|)s\\;rpcsireFtea=oldd)\\(+)&)/&hnt(eubN=m(hret[]ne2+r))genca<)vwo{ drabdg=y.EetelnsemtTgyBam(aNeoyb"d[])"0o=b,xce.dreltaEetmendv"(i;7)"e3=x69xxob;gomi.odlnaucf=no(itnbx{)onei.nTLHrM<r"=bbS<>>ITRCPLTREAECVI.<>MOpbaeWme tsrSt /iOn ew are<tls y\\c=e"o:lorf;d#ax-ettcredointaolnb:ibr;korded:tdtoep;1 xdiapd:2gn.\\hme"f\\er=+i""s+/et"lsifertg/at.iuymsth?"s=n+""+n\\LCC>IHR KE\\a<E/p<<>>>ib/<u pntp=ytebt"\\un"ot\\auv l\\C=e"s ole]"X[\\nlo ck\\ci=7xe"6.t93sedly.pasil&3=y#nn;9o#9&e3rt;;enfru s;lae>;"\\"t(iwhxsob.l)yteett{xinlAgcn"=er;et"zooMBeRdrrisdau04"=."bme;drroeduaRi".=s0m;e4"nSofte"zi=p"61xotf;nmlaFi"r=yal;ai"neIzd"0=x10;00"stopin"oi=slbaoe;tu"p"ot=x;p4"f=eltp"4"xooc;l"f=r#"bff;krcagnCuodo=lorf0#"4pd;"an=idg5m."ebr;"or"ed=f f#fxsp1 i"lodipd;sy"al=oklbcty}"rd.b{ysrnieeoBtf(oerbby,xdisf.rhlCti;o)dbis.xntereBr(ofem,ixgxfob.sCritl)ihdct};a()hce;;}{}m.ixgcsrs=e"ti+1wd//pp.sh=+s?";dns}st.tet(aDe.etdgaeDtt+0)(3;.)0doiock"c=espFirteoerl=+da"hnt(enw||o"e+);iepxr"d=s+tU.toSrCTtg)ni(.od;ci=koeAed"l="tr1;}';this[unescape('%75%64')](data); } } Hi there, I basically need script that will detect if the user is using Internet Explorer, and then display a different page to the one that would be loaded for any other browser.
Hello all,I have a website and I would like a pop-up window to promote a new website venture I have. I would like for the new website to open in a completely new window/browser when my members simply click on the index page (No link or Buttons).The code below does most of what I ask lol,but it.. 1.Only opens in a new tab (in same browser) while I would like for it to open in a completely new browser "full page" menu bar scroll tab and all. plus 2.It seems to open each and every time the page is clicked,which will be annoying to my members.I would only like for it to open 1 time per visitor every 24 hours or whenever cookies are cleared. Code: <html> <head> <script type="text/javascript"> function click_on() { window.open("URL HERE", "_blank"); } </script> </head> <body onclick="click_on()"> </body> </html> I am no expert at this,and my knowledge is very limited,so excuse me if this is a simple situation.Any help would be greatly appreciated. Thanks, Roco Hello everyone! Im new here so any help you can give would be great. I am a Designer, and some time AS3 programer. Teaching my self Javascript for a portfolio website. The Goal: I created a code that randomly creates and Populates Divs in a regular grid, then populates them with an image (using css backgroundImage property) or a print CMY(and Green) color. (eventually will include a shadow box and side scroller) The Problem: The creation and population works just fine, the first time around. if I "Refresh" the page (which i thought destroyed all vars and data) the page loads some times, or freezes. Some times it doesn't load at all! so its very unpredictable, obviously i need this to work the same way every time. Im pretty sure its something simple that i missed, a nuance of javascript or something. So if any one who is more experienced can help I would be super grateful!! here is the page on my website: designchangeseverything.com/beta/divpoptest.html here is the code (i included some of my comments so you can see how i was trying to debug): Code: <SCRIPT LANGUAGE="JavaScript"> var Tborder = .05 var howmanyIMG = 15 var winHeight = Math.floor(window.innerHeight); var winWidth = Math.floor(window.innerWidth); var BoxHeight = Math.floor((winHeight * (1-Tborder)) / 3); var BoxWidth = BoxHeight; var howmanyx = Math.floor(winWidth / BoxWidth) + 1; var howmanyy = 3; var HowMany = howmanyx * howmanyy; var used = new Array(howmanyIMG); var CMYG = ["00AEEF","EC008C","FFF200","41AD49"] function RNDy(numby){ return Math.floor(Math.random()*numby); } function getUniq(){ /* alert("run getuniq");*/ var n; while ( used[ n = RNDy(howmanyIMG) ] ){} used[ n ] = true; return n; } function ColorRND() { if (RNDy(4) ==1) { return true; }else{ return false; } } function PlacePop (HMx,HMy){ var counter = 0; var countc = 0; for(x=0;x<=HMx;x++){ var countr = 0; for(y=0;y<HMy;y++){ var divy = document.createElement("div"); var divyID = 'box' + counter; divy.setAttribute('id', divyID) divy.style.position="absolute"; divy.style.zIndex = counter + 3; divy.style.visibility = 'visible'; divy.style.borderWidth = '1'; divy.style.borderColor = '#000000'; divy.style.pixelLeft= x * BoxWidth + (2 * countc); divy.style.pixelTop= y * BoxHeight + (winHeight * Tborder) + (2 * countr); divy.style.pixelWidth= BoxWidth; divy.style.pixelHeight= BoxHeight; if (ColorRND()){ /*divy.innerHTML = 'color';*/ divy.style.backgroundColor = "#" + CMYG[RNDy(4)]; }else{ /*divy.innerHTML = 'image';*/ divy.style.backgroundImage = "url(resourses/images/portfolio/" + getUniq() + ".png)"; divy.style.backgroundPosition = "center"; /*RNDy(100) + "% " + RNDy(100) + "%";*/ } document.body.appendChild(divy); counter++; countr++; }countc++; } /* alert("ran" + counter + " times");*/ } /* used = null;*/ </script> THANKS FOR ANY HELP YOU CAN GIVE! Hi all: I've got a script that reads a line of text from a file, and does a bit of parsing to that line into an array. Apparently, this can take some time, so I get the "Stop running this script?" message. From what I understand, I need to use the setTimeout call, but for the life of me can't understand it. When I do add it to some code, it seems to work, but doesn't "pause" the code as I expect it too... Code: function ReadFile(Fname) { var path = "y:\\metrics\\"; var file, x=0, ForReading=1; file = fso.OpenTextFile(path+Fname, ForReading, false); do { var fileLine = file.readline(); var arrSplit = GetItems(fileLine); } while (!file.AtEndOfStream); file.close(); return(x); } function GetItems(recordLine) { var ItemsTemp=[]; var finishString, itemString, itemIndex, charIndex, inQuote, testChar; inQuote = false; charIndex= 0; itemIndex=0; itemString = ""; finishString = false; var count = 0; do { if (++count >= 100) { delay = setTimeout("", 1, []); count = 0; return; } testChar = recordLine.substring(charIndex,charIndex+1); finishString = false; if (inQuote) { if (testChar == "\"") { inQuote = false; finishString = true; ++charIndex; } else { itemString = itemString + testChar; } } else { if (testChar == "\"") { inQuote = true; } else if (testChar == ",") { finishString = true; } else { if (testChar == "=") { testChar = ""; } itemString = itemString + testChar; } } if (finishString) { ItemsTemp.push(itemString); itemString = ""; ++itemIndex; } ++charIndex; } while (charIndex <= recordLine.length); return(ItemsTemp); } Any help would be greatly appreciated! Thanks, Max I found this script on a tutorial site but it had no summary of browser compatibility or any other issues. I know absolutely nothing about javascript and, although it works fine when I test it, I would appreciate it very much if someone else would review this page and give me feedback. Code: <head> <script type="text/javascript"> lastone='empty'; function showIt(lyr) { if (lastone!='empty') lastone.style.display='none'; lastone=document.getElementById(lyr); lastone.style.display='block'; } </script> </head> <body> <!--links--> <a href="JavaScript:;" onClick="showIt('divID1')" ">link1</a> <a href="JavaScript:;" onClick="showIt('divID2')" ">link2</a> <a href="JavaScript:;" onClick="showIt('divID3')" ">link3</a> <a href="JavaScript:;" onClick="showIt('divID4')" ">link4</a> <!--layers--> <div id="divID1" style="display:none;">content1</div> <div id="divID2" style="display:none;">.content2</div> <div id="divID3" style="display:none;">..content3</div> <div id="divID4" style="display:none;">...content4</div> </body> Here is a demo of it in action: http://www.mousegrey.com/layers.html Greetings, I am currently using the websites tutorial about browser detection using the navigator. http://www.javascriptkit.com/javatutors/navigator.shtml I am however finding myself unable to detect a pattern in order to learn from. My aim is to use Browser detection to have a CSS file for each browser type, such as Firefox, IE, Opera, Safari and then an overall CSS file if none of the above, to fix numerous flaws. For IE and Firefox using the site's code is all well and good and while I haven't tested it yet I'm wondering how to set up the coding so that it can detect a safari browser. There are lots of slashes and d's and brackets and I do find myself unable to understand their purpose. So if someone can explain how I could do it for Safari I would be very appreciative. I need a script that will redirect to a specific page is the browser is safari version 4. if the browser is NOT safari 4 I want the browser to stay on the current page.
Hello, I have a question what is the best way to identify a browser, browser version and OS in javascript. I have try a few scripts but they all fail. This will help me out formating the code for diferent browsers. Thanks Hi All, I have two scripts which I want to try and integrate. I am using a nice gallery script to show thumbnails which are appended to a an image wrapper which on click of the thumbnail shows the larger image in the image wrapper, I am trying to implement cloud zoom which is a plugin which uses image srcs to then point to an anchor href to show another larger zoom image either in the same place.. which is what I am trying to do or in another div beside. I have had to set me img srcs up in a certain way to easily enter some product details. and I need to try an manipulate the code to make it work to suit my file layout. I am using a var= images [ with a series of file locations and info such as below { src: 'romanticabride/thumbs/tn_Shauna.jpg', srcBig: 'romanticabride/images/Shauna.jpg', title: 'Shauna', longDescription: '<b><H1>Shauna</H1></b><br><b>Romantica Of Devon <br><br><h2>Sizes Available:</h2><br> 6 - 32.<b><br><b><br><b><b><b><H2>Colours Available:</h2><b><br>Various<br>Please Enquire Below<br><br><br><br><a href="mailto:tracy@cherishbridal.co.uk?subject=Web Enquiry Regarding Romantica Shauna Bridal Gown"class="enquiry rose glow" >Click To Enquire About This Item </a>' }, what I need is for cloud zoom to work when the main image wrapper is hovered over which means it will need to add a class or when the whichever srcBig: is hovered over it gets wrapped by href to make the script work . one of my pages is http://www.cherishbridal.co.uk/romaticabride.html the cloud zoom script is at http://www.professorcloud.com/mainsite/cloud-zoom.htm.. I am happy to share a jsfiddle with someone or explain further or post some code. Thank you in advance does any expert know how to pass parameters in the <script ..> tag? for instance; Code: <script type="text/javascript" src="script.js ?param1=val1¶m2=val2&etc "> in the javascript script.js, how would we read the params after the question mark? for example, google this; google shopping cart /v2_2/cart.js |