JavaScript - Does Javascript Work Inside The Object Tag; Cookies Sessions Youtube Autoplay Chrome
Hello. I have a youtube video that autoplays everytime one opens the webpage containing the video. The only extra parameter that causes the video to autoplay is having the following added at the end of the embed src link: "&autoplay=1" If that is not present or if a zero is present in place of the 1, the video does not autoplay.
I would like the video to play only once per session. If one is visiting the webpage a second time, the parameter above should not be present or the 1 should be a zero. I am modifying attempting to modify this code: http://www.javascriptkit.com/script/...2/postit.shtml and I am able to get differnt urls to print on screen depending if it's a first visit or not. Problem 1: I cannot however get this to work in Google Chrome. Problem 2: When I attempt to get the url to be printed inside the embed src [/B]link, which is inside the object tag, the javascript either gets printed or that portion is ignored. I don't know if this is because of the quotations and the way I am handling them or if because javascript cannot be inserted inside an object tag. Here is the code: Code: <html> <body> <br><br> <script type="text/javascript"> //Post-it only once per browser session? (0=no, 1=yes) //Specifying 0 will cause postit to display every time page is loaded var once_per_browser=1 ///No need to edit beyond here/// /* var ns4=document.layers var ie4=document.all var ns6=document.getElementById&&!document.all if (ns4) crossobj=document.layers.postit else if (ie4||ns6) crossobj=ns6? document.getElementById("postit") : document.all.postit function closeit(){ if (ie4||ns6) crossobj.style.visibility="hidden" else if (ns4) crossobj.visibility="hide" } */ var url = "\"http://www.youtube.com/blah/version=3&hl=en_US&fs=1\""; function get_cookie(Name) { var search = Name + "=" var returnvalue = ""; if (document.cookie.length > 0) { offset = document.cookie.indexOf(search) if (offset != -1) { // if cookie exists offset += search.length // set index of beginning of value end = document.cookie.indexOf(";", offset); // set index of end of cookie value if (end == -1) end = document.cookie.length; returnvalue=unescape(document.cookie.substring(offset, end)) } } return returnvalue; } function showornot(){ if (get_cookie('postdisplay')==''){ showit() document.cookie="postdisplay=yes" } } function showit(){ url = "\"http://www.youtube.com/blah/version=3&hl=en_US&fs=1&autoplay=1\""; /*if (ie4||ns6) crossobj.style.visibility="visible" else if (ns4) crossobj.visibility="show" */ } if (once_per_browser) showornot() else showit() </script> <b>Outside the Object Tag:</b> <br> <script type="text/javascript">document.write(url);</script> <br><br> <b>In the Object Tag</b> <br><br> <object width="570" height="250"><param name="movie" value="http://www.youtube.com/blah?version=3&hl=en_US&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src=<script type="text/javascript">document.write(url);</script> type="application/x-shockwave-flash" width="570" height="250" allowscriptaccess="always" allowfullscreen="true"></embed></object> </body> </html> Similar TutorialsHi every one, i'm new in this forum and also quite new in coding i wrote some code to login and register with php, also using some function with javascript, everything worked fine also with chrome, but suddenly, without change of any code, chrome doesn't activate js functions while FF and IE do activate them. can anyone suggest what could be the reason? ---Edit: as suddenly as it stopped, now it working again. chrome works in mysterious ways... I have something that's called with AJAX when the user enters some text (http://askvoke.com). What I want is to execute some javascript within this "frame". If the frame calls something, with say
Code: <script type=\"text/javascript\"> document.write('h'); </script> in it, then "h" doesn't appear, and neither does anything besides what would normally be shown if I didn't add that. Anyone have a solution? I'm new to the forum. So hi everyone. The code below works fine on IE and FF but not on Google Chrome. Can someone tell me where I'm doing wrong? Thank you for your answers in advance. Im really looking forward much to hearing from you. You can preview the below code by pasting it to Frontpage, Dreamweaver and etc. Quote: <!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>Untitled Document</title> <script type="text/JavaScript"> <!-- function show(id) { if (document.getElementById(id).style.display == 'none') { document.getElementById(id).style.display = ''; } } //--> <!-- function hide(id) { document.getElementById(id).style.display = 'none'; } //--> </script> </head> <body> <div> <div> <table cellspacing="1" cols="3" border="0"> <tbody> <td><a onfocus="hide('tblB');hide('tblC');show('tblA');" href="#">A</a> <td><a onfocus="hide('tblA');hide('tblC');show('tblB');" href="#">B</a> <td><a onfocus="hide('tblB');hide('tblA');show('tblC');" href="#">C</a> </td> </tr> </tbody> </table> </div> <div> <table id="tblA" style="DISPLAY: none" cols="1" cellpadding="2"> <tbody> <tr valign="top" align="left"> <td> You select A, table tblA is shown </td> </tr> </tbody> </table> </div> <div> <table id="tblB" style="DISPLAY: none" cols="1" cellpadding="2"> <tbody> <tr valign="top" align="left"> <td> You select B, table tblB is shown </td> </tr> </tbody> </table> </div> <div> <table id="tblC" style="DISPLAY: none" cols="1" cellpadding="2"> <tbody> <tr valign="top" align="left"> <td> You select C, table tblC is shown </td> </tr> </tbody> </table> </div> </div> </body> </html> Hi there, I hope I post this in the right section. I'm trying to do a redirect using the below code: <script type="text/javascript"> window.location.href = "http://google.com" </script> FF and IE work as they should. Chrome doesn't. The request above to http://google.com, gets a 'canceled' status in Chrome browser > Development tools > "Network". I've tried several other functions: location.href = url location.replace(url) document.location = url location.assign(url) window.open(url, '_self') Same code pasted within a local html file works fine. Below is the redirect request that it's canceled by chrome: http://pastebin.com/hD36M1RG Any clues? Thanks Hi, every time I try and alert: [ { number:0, secondnumber:0 }, { number:2, secondnumber:1 }, { number:1, secondnumber:2 } ] it just shows [object object], [object object], [object object]. Why is this and what can I do to make the record be shown as it is above in an alert? Thanks. Does anyone know why Chrome's alert responses are different to IE and FF? Code: <script> function checkDriveletter(){ var drive=0; var drive = readCookie('choose'); alert(drive); createCookie('choose',1,9999); var drive = readCookie('choose'); alert(drive); } window.onload=checkDriveletter; </script> In Chrome the cookie never seems to get set. My cookie code is: Code: function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function eraseCookie(name) { createCookie(name,"",-1); } Hello. Is there any way to get the variable name of an object from inside the object? E.g. PHP Code: function Bla(){ this.write = function(){ document.write(<objectname>); } } obj1 = new Bla(); obj1.write(); //Outputs obj1 Here is my script: PHP Code: function myTimer(seconds, obj){ this.seconds = seconds; this.obj = obj; this.startTimer = function(){ if(this.seconds>0){ this.seconds--; this.obj.innerHTML = this.seconds; this.timer = setTimeout("Timer.start()",1000); } } } Timer = new Timer(10, obj); Timer.startTimer(); Now the problem is that the variable that contains the object must be named "Timer". This way I cannot create new timer objects with different variable names I have tried: this.timer = setTimeout("this.start()",1000); but it doesn't work. That's why it would be good to detect the variable name and instead use something like this: this.timer = setTimeout(varname+".start()",1000); I would rather not have to pass the variable name through a parameter like this: Timer1 = new Timer(10, obj, "Timer1"); Thanks in advance. Hello, I am attempting to implement a javascript joystick plugin. The project has a google code page located at: http://code.google.com/p/javascript-joystick/ After installing the plugin, the javascript works flawlessly in IE and FF, however chrome has some issues with executing it. A hosted version of what I am having trouble with can be found at http://www.jimmyblaze.net/joytest/simple.html The issue seems to be with a snippet of code from the main script that attempts to create an object and embed it on the page. The trouble area can be found he Code: try { ctrlFF.type = "application/x-vnd.numfum-joystick"; ctrlFF.width = 0; ctrlFF.height = 0; /* * Before accessing the plug-in's script interface it needs to be * added to the page. If the 'setDevice' call fails, the plug-in * is assumed to either not be installed or not working in this * browser, in which case it is removed in the catch. */ document.body.appendChild(ctrlFF, document.body); if (ctrlFF.setDevice(0) != null) { /* * As with the code for IE, any non-null value is a * success. */ return ctrlFF; } Chrome doesn't seem to support the .setDevice function, as when running the chrome developer tools inspect element tool, I can see it throw an exception at that line, and prompts the user to update java, because it thinks it is out of date. Has anyone run into this issue with chrome and know of a possible fix? Thanks a lot for your time, Legomaniac I have created this svg color picker : Edit fiddle - JSFiddle I want that each color can be clicked and if each of them clicked, it will rotate the selected image to the top while the rest of the color will be moved accordingly clockwise (like a wheel). Hi Friends, I am really tired with Chrome , one of my window.open() Stuff work fine in FF and Opera in Fedora O.S. But Chrome Did not , my code is like: <script type="text/javascript"> function getpage(id, type){ $.ajax({ type: "POST", data: "key="+id, async: false, url: "<?php echo site_url(); ?>/server/precp/"+type, success: function (msg) { window.open("<?php echo site_url(); ?>/server/cplogin/"+msg, "autologin"); } }); } </script> and it call in another JavaScript function like: function doKeyup(id,e) { if(e == 13) { //alert("e:"+e); var cp = $("table#serverdata tbody tr#container_tr.row_no td:nth-child(7) a#cp").html(); var dc = $("table#serverdata tbody tr#container_tr.row_no td:nth-child(7) a#dc").html(); if(cp != null || dc != null ) { var firstId = $("table#serverdata tbody tr#container_tr.row_no td:nth-child(1) input[type=checkbox]").val(); } if(cp != null) { alert("Enter here"); getpage(firstId,'cp'); return false; } and it firstly call from onkeyup as : <input type="text" name="find_text0" id="find_text0" autocomplete="off" <?php if ('B' == $sb_pos) { ?> onfocus="document.getElementById('find_text1').value='';" <?php } ?> onkeyup = "return doKeyup('0',event.keyCode);" /> Please Give me a Solution ASAP. Thankfully Anes This is puzzling me. It's an incremental search function. Any help for a Javascript novice much appreciated: Code: $(function () { $('#quickFilter').incrementalFilter({ items: 'dl.entryList > dt', foundCounter: '#resultCount', totalCounter: '#totalCounter', minChars: 2 }).focus(); }) ... here's the rest of it: Code: (function($) { var IncrementalFilter = function(params){ var setting = this.setting = { input: undefined, items: undefined, searchScope: '*', minChars: 2, useHighlight: true, foundCounter: undefined, totalCounter: undefined, highlightElem: $('<em class="highlight" />'), foundClass: 'found', zeroClass: 'zero' } $.extend(setting,params) this.input = $(setting.input); this.items = $(setting.items); this.minChars = setting.minChars; if(setting.foundCounter){ this.totalCounter = setting.totalCounter; this.foundCounter = new IncrementalFilter.Counter(setting); } this.formerQuery = ''; this.itemData = []; this.init(); } IncrementalFilter.prototype = { makeData: function(){ var that = this; this.items.each(function(){ var obj = [$(this)] if($(this).is('dt')){ obj.push($(this).next()) } that.itemData.push(new IncrementalFilter.SearchedItem(obj,that.setting)); }) if(this.foundCounter){ this.foundCounter.refresh(this.itemData.length); if(this.totalCounter){ $(this.totalCounter).html(this.foundCounter.all) } } }, processQuery: function(query){ var tempq = this.escapeQuery(query) tempq = $.trim(tempq).split(/\s+/); var queries = [] for(var i=0,l=tempq.length;i<l;i++){ for(var j=0,m=tempq.length;j<m;j++){ if(i!=j && tempq[i] && (tempq[i] == tempq[j] || RegExp(tempq[i]).test(tempq[j]) || tempq[i].length < this.minChars)){ tempq.splice(i,1) l = m = tempq.length; } } if(tempq[i]){ queries.push(tempq[i]) } } if(queries.join(' ') != this.formerQuery){ this.search(queries); this.formerQuery = queries.join(' '); } }, escapeQuery: function(query){ var escapeChars = '.+*^$?()[]{}'; var res = query; for(var i=0,l=escapeChars.length;i<l;i++){ var ec = escapeChars.charAt(i); res = res.replace(RegExp('\\'+ec,'g'),'\\'+ec); } return res; }, search: function(queries){ var that = this; var count = 0; $(that.itemData).each(function(){ var self = this; var matchCount = 0; $.each(queries,function(){ if(RegExp(this,'i').test(self.text)) matchCount++; }) if(matchCount == queries.length){ this.showItem() this.clearHighlight(function(){ $.each(queries,function(){ self.highlightWord(this) }) }); count++; }else{ this.hideItem(); } }) if(this.foundCounter){ this.foundCounter.refresh(count) } }, reset: function(){ var that = this; $(this.itemData).each(function(){ this.showItem(); this.clearHighlight(); if(that.foundCounter){ that.foundCounter.reset(); } }) }, setEvent: function(){ var that = this; this.input.bind('keyup',function(){ var val = $(this).val(); if(val.length >= that.minChars){ that.processQuery(val) }else{ that.reset(); } }) }, init: function(){ this.makeData(); this.setEvent(); if(this.input.val().length >= this.minChars){ this.processQuery(this.input.val()) } } } /** *@param obj {array} **/ IncrementalFilter.SearchedItem = function(obj,setting){ this.useHighlight = (setting.useHighlight && $.fn.highlightText && $.fn.removeOuterTag) if(this.useHighlight){ this.highlightElem = setting.highlightElem || $('<em class="highlight" />'); this.highlightExpr = /^<(\w+)/.exec($('<div />').append(this.highlightElem).html())[1] + '.'+this.highlightElem.attr('class').split(/\s/).join('.'); } this.text = ''; this.obj = []; for(var i=0,l=obj.length;i<l;i++){ var temp = obj[i]; this.obj[i] = {'elem':temp,'orgsrc':temp.html()} this.text += obj[i].text(); } } IncrementalFilter.SearchedItem.prototype = { hideItem: function(){ $(this.obj).each(function(){ this.elem.hide(); }) return this; }, showItem: function(){ $(this.obj).each(function(){ this.elem.show(); }) return this; }, clearHighlight: function(callback){ if(!this.useHighlight) return this; var that = this; $(this.obj).each(function(){ $(that.highlightExpr,this.elem).removeOuterTag() }) if(callback) callback(); return this; }, highlightWord: function(word){ if(!this.useHighlight) return this; var that = this; var query = new RegExp(word,'gi') $(this.obj).each(function(){ this.elem.highlightText(query,that.highlightElem) }) return this; } } IncrementalFilter.Counter = function(setting){ if(!setting || !setting.foundCounter) return undefined; this.obj = $(setting.foundCounter); this.foundClass = setting.foundClass || 'found'; this.zeroClass = setting.zeroClass || 'zero'; this.all = undefined; this.refresh = function(count){ this.obj.html(count); if(!this.all){ this.all = count; } if(count == 0){ this.zero() }else if(count < this.all){ this.highlight(); } } this.reset = function(){ this.refresh(this.all); this.obj .removeClass(this.foundClass) .removeClass(this.zeroClass) } this.highlight = function(){ this.obj .removeClass(this.zeroClass) .addClass(this.foundClass) } this.zero = function(){ this.obj .removeClass(this.foundClass) .addClass(this.zeroClass) } return this; } $.fn.incrementalFilter = function(params){ return this.each(function(){ if(typeof params == 'string' || params.size){ new IncrementalFilter({input:$(this),items:params}) }else if(typeof params == 'object'){ params.input = $(this); new IncrementalFilter(params) } }); }; Here's my object constuctor: Code: function suggest_object(result_id) { this.in_result_div = false; this.search_element = document.getElementById(result_id); } And the execution code: Code: var suggest = new suggest_object(result_id); document.getElementById(result_id).onmouseover = function(){suggest.in_result_div = true;} It works as is, but i'd really like to be able to set the onmouseover inside of the object. Something like Code: function suggest_object(result_id) { this.in_result_div = false; this.search_element = document.getElementById(result_id); this.input_element.onmouseover = function() { this.in_result_div = true; } } So how can I get the 'this' inside the onmouseover function to refer to the object? Alright, I am going to post the sections that matter, and then post the full JS at the bottom. Alright, so youtube allows you to pull videos using javascript. here is the what I am using Code: function insertVideos(div,typ,q,results,overlay){ inlineVideo = overlay; youtubediv[q.toLowerCase()] = div; var script = document.createElement('script'); if(typ == "favs") script.setAttribute('src', 'http://gdata.youtube.com/feeds/users/'+q+'/favorites?max-results='+results+'&alt=json-in-script&callback=youtubeInit'); if(typ == "user") script.setAttribute('src', 'http://gdata.youtube.com/feeds/users/'+q+'/uploads?max-results='+results+'&alt=json-in-script&callback=youtubeInit'); script.setAttribute('id', 'jsonScript'); script.setAttribute('type', 'text/javascript'); document.documentElement.firstChild.appendChild(script); } alright, and here is the HTML code. Code: <div id="youtubeDivFavs" align="center"> </div> <script> insertVideos('youtubeDivFavs','favs','lancxeon','5',0); </script> <div id="youtubeDivUser" align="center"> </div> <script> insertVideos('youtubeDivUser','user','lancxeon','5',0); </script> Now as you can see there are two here. the second one "user" pulls from the url http://gdata.youtube.com/feeds/users/lancxeon/uploads It works fine on my website. the second one pulls from http://gdata.youtube.com/feeds/users/lancxeon/favorites It does not work. It makes no sense as you can see both of the urls work fine. I have already tried only using the favorites one and getting rid of the user one.. to see if it was interfering. And it still would not work. It truly makes no sense to me why it does not work, if one works why will the other not work? Here is the full JS file Code: <!-- var cleanReturn = 1; //do you want a full youtube return, or just an image list var inlineVideo = 1; //do you want to redirect to youtube, or play inlinevideo var timer; var i =0; var youtubediv = new Array(); function clearList(ul){ var list = document.getElementById(ul); while (list.firstChild) { list.removeChild(list.firstChild); } } function hideOverlay(){ var overlay = document.getElementById('youtubeoverlay'); overlay.style.display = 'none'; overlay.innerHTML = ""; } function videoOverlay(id){ var objBody = document.getElementsByTagName("body").item(0); if(objBody){ var video = document.createElement('div'); video.setAttribute('id', 'youtubeoverlay'); video.innerHTML = '<div id="youtubecontent"><a href="javascript:hideOverlay()" id="close">Close</a><br /><object width="510" height="420"><param name="movie" value="http://www.youtube.com/v/'+id+'"></param><param name="autoplay" value="1"><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/'+id+'&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="510" height="420"></embed></object></div>'; objBody.insertBefore(video, objBody.firstChild); }else{ alert('no body element. please add'); } } function mousOverImage(name,id,nr){ if(name) imname = name; //make border orange imname.style.border = '4px solid orange'; imname.src = "http://img.youtube.com/vi/"+id+"/"+nr+".jpg"; nr++; if(nr > 3) nr = 1; timer = setTimeout("mousOverImage(false,'"+id+"',"+nr+");",1000); } function mouseOutImage(name){ if(name) imname = name; //make border back to greyish imname.style.border = '4px solid #333333'; if(timer) clearTimeout(timer) } function getVideoId(url){ var match = url.lastIndexOf('='); if (match) { id = url.substring(match+1); return id; } } function getId(string){ var match = string.lastIndexOf("'s Videos"); if (match != -1) { id = string.substring(0,match); return id.toLowerCase(); } var match = string.lastIndexOf("query"); if (match != -1) { id = string.substring(match+7); return id.toLowerCase(); } } function listVideos(json,divid) { divid.innerHTML = ''; var ul = document.createElement('span'); ul.setAttribute('id', 'youtubelist'); if(json.feed.entry){ for (var i = 0; i < json.feed.entry.length; i++) { var entry = json.feed.entry[i]; for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { url = entry.link[k].href; break; } } var thumb = entry['media$group']['media$thumbnail'][1].url; var li = document.createElement('span'); li.setAttribute('id', 'youtubebox'); if(cleanReturn == 1){ if(inlineVideo == 1){ li.innerHTML = '<a href="javascript:videoOverlay(\''+getVideoId(url)+'\');"><img src="'+thumb+'" id="youtubethumb" alt="'+entry.title.$t+'" onmouseout="mouseOutImage(this)" onmouseover="mousOverImage(this,\''+getVideoId(url)+'\',2)"></a>'; }else{ li.innerHTML = '<tr><a href="'+url+'" target="_new"><img src="'+thumb+'" border="0" id="youtubethumb" alt="'+entry.title.$t+'" title="'+entry.title.$t+'" onmouseout="mouseOutImage(this)" onmouseover="mousOverImage(this,\''+getVideoId(url)+'\',2)"></a>'; } }else{ li.innerHTML = entry.content.$t; } ul.appendChild(li); } }else{ divid.innerHTML = 'No Results Found'; } document.getElementById(divid).appendChild(ul); } function youtubeInit(root) { //this hacks the layer for mutiple json queries id = getId(root.feed.title.$t); listVideos(root, youtubediv[id]); } function insertVideos(div,typ,q,results,overlay){ inlineVideo = overlay; youtubediv[q.toLowerCase()] = div; var script = document.createElement('script'); if(typ == "favs") script.setAttribute('src', 'http://gdata.youtube.com/feeds/users/'+q+'/favorites?max-results='+results+'&alt=json-in-script&callback=youtubeInit'); if(typ == "user") script.setAttribute('src', 'http://gdata.youtube.com/feeds/users/'+q+'/uploads?max-results='+results+'&alt=json-in-script&callback=youtubeInit'); script.setAttribute('id', 'jsonScript'); script.setAttribute('type', 'text/javascript'); document.documentElement.firstChild.appendChild(script); } //--> hi I am trying to play a video from youtube. What I have done so far is getting videos from my database and displaying all those videos thumbnails. So now what i want is to when i click any thumbnail it should play that video in my website. How can I do this? Here is my code Code: function showResult(result) { $('#videosLoader').css('display','none'); var videoId = result.split(" "); for(i = 0; i < videoId.length - 1; i++) { var vidId = $.trim(videoId[i]); vidLink = getScreen(vidId,"small"); $('#videosList').append("<div class='playVid'>" + "<img width=80 height=80 src=" + vidLink + " alt='' /> " + "<input type='hidden' name='vidId' value='" + vidId + "' />" + "</div>").addClass("playVid"); } $('.playVid').click(function() { var val = $("input[name='vidId']").val(); alert("val"); $("#haveYourDefinition").append("<embed src='http://www.youtube.com/v/" + val + "&rel=1' pluginspage='http://adobe.com/go/getflashplayer' type='application/x-shockwave-flash' quality='high' width='450' height='376' bgcolor='#ffffff' loop='false'></embed>"); }); When I click any thumbnail it does nothing. Why and please tell me how to do this? Help Hi all, I'm struggling to support IE and I have multiple .watch functions... I found this link below but I don't know how to implement it! Am I supposed to throw it in a js file and use it like I do in mozilla?? Someone please help me out.. http://stackoverflow.com/questions/1...472666#5472666 Thanks! I'm new to client side js, so I'm trying to figure out the relationship between the js frames object and the <frame></frame> tags. I have read and reread the information in my book on this subject and googled many examples, but still need clarification. if I have the following code in the body of an HTML document. Code: <frame name="f1"> </frame> <<frame name="f2"> </frame> Then I should get back 2 when I do this Code: alert(document.frames.length); Instead I get document.frames is undefined from Foxfire and get 0 from ie8. If I replace document with top, window, self or parent I get 0 in both Foxfire and ie8. I'm confused, J. I am new to javascript and am having trouble with what is probably very easy code. I have a video that I would like to have play on click. I was able to disable to autoplay but now I am stuck. Any help would be appreciated, Thanks! [CODE] <script type="text/javascript"> var flashvars = {}; var params = {}; params.wmode = "transparent"; params.play ="false"; var attributes = {}; swfobject.embedSWF("http://www.file.swf", "flashDiv", "450", "270", "9.0.0", "http://www.file.swf", flashvars, params, attributes); </script> hello to everyone i need a way to create a cookie based on user selection from a dropdown list and a radio button set . from the drop down list i control var city (1,2,3...) and from the radio buttons dow(f,s) , cdate(a,b,c,...) , ctime (a,b,c,...) it is a clock format and i want in the first page when the user select's the format that he wants it will remain in every page until he leaves the site Thankz |