Jump to content

Search the Community

Showing results for tags 'javascript'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

  1. Ok. Sorry that the title was a bit confusing, but this is what I need. I have the Konami code currently working on my website. Here is what I want to happen: If you get the code wrong: I want an alert that states you got it wrong. If you get it right, a youtube video opens in lightbox or fancybox. If this is not possible, how do I simply direct the user to another page on my site? This is my site currently: http://webdesign.miad.edu/stimm/ This is my javascript/jquery code: <script type="text/javascript" src="scripts/jquery.js"></script><script type="text/javascript" src="scripts/konami-JS.js"></script> <script type="text/javascript">konami = new Konami()konami.code = function() {alert("You have entered the KONAMI CODE! You now have 30 lives. Kinda.")} konami.load()</script> The Konami code works (up, up, down, down, left, right, left, right, b, a, enter). It just doesn't do what I want yet.
  2. I'd like to access a database that is on the client side via Javascript and was wondering how to best go about this. I was thinking it may work to use Ajax to call a C# data application, but wondered if that would be most efficient. I suppose PHP would be another alternative, but I prefer working in C# if I can. Thanks!
  3. Hi guys, so i've been working on this idea for quite a while now.. the only thing is.. i'm not exactly sure how to do it.. i want to make a automatic request system where you can request phone repair service trough the company website. something like: (DROPDOWN BOX) iPhone(selected) Samsung Nokia Sony Ericsson HTC ( DROPDOWNBOX which will react on first choice, like when i select iPhone something like this should come)iPhone 3(G)SiPhone 4iPhone 4 SiPhone 5 and then ofcourse the 3rd dropdown box where you will be selecting the problem(DROPDOWN BOX)Screen brokenButton doesnt workPhone wont chargeWater damagePhone wont go onSoftware issue and then the selected items gotta be saved in a database or something.. not exactly sure how i'm gonna do that.. (ofcourse there will be more info required to request a repair, like name and adress and all that.. but for now i just wat the dropdown boxes working) Soooooo.... anyways i've made an array with php before.. but i don't know exactly how to make them in combination with if//else like if iphone selected, include.... the other select.. here's what i made so far <html><body> <?php $devices = array('iphone' => 'iPhone', 'samsung' => 'Samsung', 'nokia' => 'Nokia', 'sonyericsson' => 'Sonyericsson', 'htc' => 'HTC',);echo '<form method="post">'; echo '<select>'; foreach($devices AS $key => $value) echo '<option value="'. $key .'">'. $value .'</option>'; echo '</select>'; echo '<input type="submit" value="Submit">'; echo '</form>'; ?></body></html> If someone could help me i would really appriciate it, Thanks guys! Edit: I've tried something with buttons aswell... in combination with javascript.. didn't work out so well <!DOCTYPE html><html><head><script>function iphonebtn() /*The iPhone Buttons*/{document.getElementById("demo").innerHTML= "iPhone";var element = document.createElement("button");document.getElementById("apple").appendChild(element);var element2 = document.createElement("button");document.getElementById("apple").appendChild(element2);var element3 = document.createElement("button");document.getElementById("apple").appendChild(element3);document.getElementById("apple").getElementsByTagName("button")[1].innerHTML="iPhone 5";document.getElementById("apple").getElementsByTagName("button")[2].innerHTML="iPhone 4";document.getElementById("apple").getElementsByTagName("button")[3].innerHTML="iPhone 4s"; /*document.getElementById("apple").onclick = function(){ alert ("please choose problem")};*/};/*The Samsung Buttons*/function samsungbtn(){document.getElementById("demo2").innerHTML= "Samsung";var element4 = document.createElement("button");document.getElementById("samsung").appendChild(element4);var element5 = document.createElement("button");document.getElementById("samsung").appendChild(element5);var element6 = document.createElement("button");document.getElementById("samsung").appendChild(element6);document.getElementById("samsung").getElementsByTagName("button")[1].innerHTML="Galaxy SII";document.getElementById("samsung").getElementsByTagName("button")[2].innerHTML="Galaxy SIII";document.getElementById("samsung").getElementsByTagName("button")[3].innerHTML="Galaxy S Advance"; /*document.getElementById("samsung").onclick = function(){ alert ("please choose problem")};*/ }; /*The HTC Buttons*/ function htcbtn(){ document.getElementById("demo4").innerHTML= "HTC";var element10 = document.createElement("button");document.getElementById("htc").appendChild(element10);var element11 = document.createElement("button");document.getElementById("htc").appendChild(element11); var element12 = document.createElement("button");document.getElementById("htc").appendChild(element12);document.getElementById("htc").getElementsByTagName("button")[1].innerHTML="HTC one X";document.getElementById("htc").getElementsByTagName("button")[2].innerHTML="HTC one V";document.getElementById("htc").getElementsByTagName("button")[3].innerHTML="HTC one S"; /*document.getElementById("htc").onclick = function(){ alert ("please choose problem")};*/}; /*The defect Buttons*/ function defectbtn(){document.getElementById("demo3").innerHTML= "Problem";var element7 = document.createElement("button");document.getElementById("glass").appendChild(element7);var element8 = document.createElement("button");document.getElementById("glass").appendChild(element8); var element9 = document.createElement("button");document.getElementById("glass").appendChild(element9);document.getElementById("glass").getElementsByTagName("button")[1].innerHTML="Water Damage";document.getElementById("glass").getElementsByTagName("button")[2].innerHTML="Phone wont Charge";document.getElementById("glass").getElementsByTagName("button")[3].innerHTML="Button doesn't work"; };</script></head><body> <font face="arial" size="4" color="blue"> Kies uw telefoon </font><div id="apple"><button id="demo" type="button" onclick="iphonebtn(),defectbtn(),this.disabled = 'disabled';"> iPhone </button></div><br /><div id="samsung"><button id="demo2" type="button" onclick="samsungbtn(),defectbtn(),this.disabled = 'disabled';"> Samsung </button></div><br /> <div id="htc"><button id="demo4" type="button" onclick="htcbtn(),defectbtn(),this.disabled = 'disabled';"> HTC </button></div><br /> <div id="glass"><button id="demo3" type="button" onclick="defectbtn(),this.disabled = 'disabled';"> Problem </button></div><br /> <h1>Reparatie aanvragen</h1> <p></p> <form name='registration' onSubmit="return formValidation();"> <ul> <li><label for="userid">ID (indien bekend)</label></li> <li><input type="text" name="ID" size="12" /></li> <li><label for="username">Voornaam:</label></li> <li><input type="text" name="username" size="50" /></li> <li><label for="address">Adres:</label></li> <li><input type="text" name="address" size="50" /></li> <li><label for="country">Land:</label></li> <li><select name="country"> <option selected="" value="Default">(Selecteer een Land)</option> <option value="AF">Nederland</option> <option value="AD">België</option> </select></li> <li><label for="zip">Postcode:</label></li> <li><input type="text" name="zip" /></li> <li><label for="email">Email:</label></li> <li><input type="text" name="email" size="50" /></li> <li><label>Language:</label></li> <li><label for="desc">Bijzonderheden:</label></li> <li><textarea name="desc" id="desc"></textarea></li> <li><input type="submit" name="submit" value="Submit" /></li> </ul> </form></body></html>
  4. I have a marquee on my website (http://blogandthecity.net). I want it to be stuck at the screen. I think it is called "fixed". You know what I mean? Right now the marquee stops at a certain point, but I want it to be the size of the whole screen/website. So I think there are two options: 1. make the marquee as long as possible (However some webpages are longer than others. And I don't know how I can make the marquee longer. I already tried some things) 2. make the position fixed. (I tried to put "position: fixed" in the code, but the result is that the marquee doesn't scroll anymore. So the movement stops. And the marquee doesn't fit the screen either..) Do you know how I can solve this problem? If you need the css style, I will put it here too. Ectually, I am afraid it is not possible. If not, does somebody know how I can let it "fade" away in the screen/white at the end of the marquee?
  5. I am making a file upload system. The user chooses where to upload using the dynamic drop down list. And this is the problem I am facing right now. This is my form. <form action="uploader.php" method="POST" enctype="multipart/form-data" name="uploads"> <label for="file">Choose a file: </label> <input type="file" name="userfile" id="userfile"><br/><br/> <select id="text-one" name="one"> <option selected value="base">Select Department</option> <option value="CSE" name="cse">Computer Science Engineering</option> <option value="ECE" name="ece">Electronics & Communication Engineering</option> <option value="MECH" name="mech">Mechanical Engineering</option> </select> <br /><br/> <select id="text-two" name="two"> <option>Select Semester</option> </select> <br /><br/> <select id="text-three" name="three"> <option>Select Subject</option> </select> <br/><br/> <button class ="btn btn-primary" button type="submit" name="upload" value="Upload" onClick="val()">Upload</button> </form> And this is my other php file to which it is linked. <?phpif(isset($_POST['upload'])){ $path1=$_POST['one']."/"; $path2=$_POST['two']."/"; $path3=$_POST['three']."/"; $upload_path=$path1.$path2.$path3;}else{ echo "Select a Subject"; echo "<br>";}$allowed_filetypes = array('.doc','.docx','.jpg','.jpeg','.png','.ppt','.pptx','.xls','.xlsx','.pdf','.txt','.zip','.rar');$max_filesize = 20000000;$filename = $_FILES['userfile']['name'];$ext = substr($filename, strpos($filename,'.'), strlen($filename)-1);if(!in_array($ext,$allowed_filetypes)) die("<script LANGUAGE='JavaScript'> window.alert('You cannot upload the following type of file!') window.location.href='upload.php'; </SCRIPT>");if(filesize($_FILES['userfile']['size']) > $max_filesize) die("<script LANGUAGE='JavaScript'> window.alert('The file you attempted to upload is too large!') window.location.href='upload.php'; </SCRIPT>");if(!is_writable($upload_path)) die("<script LANGUAGE='JavaScript'> window.alert('You cannot upload to the specified directory!') window.location.href='upload.php'; </SCRIPT>");if(move_uploaded_file($_FILES['userfile']['tmp_name'],$upload_path . $filename)) echo ("<script LANGUAGE='JavaScript'> window.alert('Your file has been uploaded successfully') window.location.href='upload.php'; </SCRIPT>");else echo ("<script LANGUAGE='JavaScript'> window.alert('There was an error during the file upload!') window.location.href='upload.php'; </SCRIPT>");?> I have edited the phpini file with the following settings and also made a .htaccess file in the php folder.upload_max_filesize 25M post_max_size 25M memory_limit 64MBut when I intentionally upload a file greater than 25 MB, I get the error as given in the title. Also, considering the max file size is being violated, it does not give the error related to the file size, i.e The file you attempted to upload is too large, it says You cannot upload the following type of file. And in the background that post length warning thing comes.Please help me with this. I am on my localhost.
  6. I'm pretty new to javascript/ajax/php/html so bear with me.I am Trying to use ajax to connect to a database. The reason I am using ajax is so I can dynamically update the webpage as information is gathered about the database. So far I have is setup so that when a button is clicked: <input type="button" value="Login" onclick="sqllogincheck(this.form)"> a function is ran that will connect up to the database server side: <html><head><title>High Plains Regional Climate Center</title><link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"><?php wp_head(); ?></head><!--All functions for pages--><script>//login and get mysql tables, update table status viewfunction sqllogincheck(frm) {var xmlhttp; //All fields must be fullif (frm.sqlusr.value == "" || frm.sqlhost.value == "" || frm.sqlpwd.value == "") { alert("Missing Fields!");}//use AJAX to setup a query to the serverelse { xmlhttp=new XMLHttpRequest(); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("dbstatus").innerHTML=xmlhttp.responseText; } } //send POST request to server xmlhttp=open("POST","citools/login.php",true); xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); xmlhttp.send("sqlusr=" + frm.sqlusr.value + "&sqlhost=" + frm.sqlhost.value + "&sqlpwd=" + frm.sqlpwd.value); //alert("Username: " + frm.sqlusr.value + "\nHost: " + frm.sqlhost.value + "\nPassword: " + frm.sqlpwd.value)}}</script><body><div id="wrapper"> <div id="header"> <img src="<?php bloginfo('template_directory'); ?>/images/headers/top_logo.jpg" alt="HPRCC"> <!--<div id="menu"> <?php wp_nav_menu( array( 'theme_location' => 'header-menu', 'container_class' => '') ); ?> </div>--> <?php shailan_dropdown_menu(); ?> <h1 id="pagetitle"><?php wp_title(); ?></h1> </div> When I test this code out I get the error "Uncaught TypeError: Object [object Window] has no method 'setRequestHeader'". I have the vague idea that this means there is no 'setRequestHeader' method in the xmlhttp object, but im not sure how to correct it.Just a bit more info here. I'm testing this page using localhost and am not sure if that has anything to do with the error. Also, I'm using Wordpress for my CMS and this is why I only posted the header here.Thanks for the help.
  7. Hi there Fellows!! I've encountered at a bizarre behavior at the underneath code snippet. what I've tried to do is to turn on the visibility of the second div element when the mouse hovers on the first div element. and then, when the mouse goes over the second div element, it triggers a CSS animation on the third div element. but strangely, when the mouse hovers on the second div element, it indeed triggers the CSS animation, but the second div element itself disapper although it wasn't requested to do so. can someone here figure out why does this occur and how to prevent it? any help will be appreciated!! thanks in advance!! atar. <html><head><title></title><script type="text/javascript">try{function start(){var divFirst = document.getElementById("divFirst");var divSecond = document.getElementById("divSecond");var divThird = document.getElementById("divThird");divFirst.onmouseover = function(e){divSecond.style.visibility = "visible";}divSecond.onmouseover = function(e){divSecond.style.visibility = "visible";}divSecond.onmouseover = function(e){divThird.style.width = window.innerWidth;}divThird.onmouseout = function(e){divThird.style.width = "0px";}divFirst.onmouseout = function(e){divSecond.style.visibility = "hidden";}}//end start().}//end try statement.catch(err){alert("there's an error in this page. \n the error message is:\n" + err.message + "\n the error name is: \n" + err.name + "\n and the error details are:\n" + err.constructor + "\n and the error stack is: \n" + err.stack);}//end catch statement.</script><style type="text/CSS">div#divFirst {background-color:red;}div#divSecond {background-color:blue; visibility:hidden;}div#divThird {background-color:green; -o-transition:width 1s; -webkit-transition:width 2s; width:0px; overflow:hidden;}</style></head><body onload="start()"><div id="divFirst">my first div!!</div><div id="divSecond">my second div!!</div><br /><div id="divThird">my third div!!</div></body></html>
  8. I want to changedomain.com/profile.php?user_id=100todomain.com/Danolike facebook or youtubehow can I do that in ASP classic or JavaScript??
  9. Hey everyone! i am creating a dynamic drop down menu in html, but the values are not coming in the drop down, it shows an empty menu. I am calling the PHP file which is echoing JSON of the data. here is the Javascript code.. $(function(){var serviceURL = "http://localhost/mano-2/";var get = ''; get = 'echo_cat.php'; var items=""; $.getJSON(serviceURL + get , function(data){ $.each(data,function(index,item) { items = items + "<option value='"+item.entity_id+"'>"+item.name+"</option>" ; }); $("#a1_title").html(items); });}); the JSON is like this {"items":[{"entity_id":"1","name":"Root Catalog"},{"entity_id":"2","name":"Default Category"}]} the HTML code is like this <select id="a1_title"> <option>Default</option></select> Please help me..
  10. Hi, I'm newbie & just have self-learning a few weeks ago...I've tried to understand how to implement my idea into asp.net vb programming & javascript. I've done all parts except the keystroke part.I would like to calculate the keyhold time of a keypress in ms & also the inter-key latency time between 2 keys. The idea is as below:key 'A' is pressed (keydown) - record keyhold timekey 'A' is depressed (keyup) - record keyhold timekey 'A' is pressed & key 'B' is depressed - record inter-key latency time And also, I need ideas how to put my keystroke data into database. Should I record the key character also??Example: A.down.time || A.up.time || A.B.timeWhat do you think is the simplest way to do as I'm a beginner... Tq. . . v()//
  11. I'm using this function to detect whether a key is being hold: var keyDown=new Array(false,false,false,false,false,false); function keys(e,isDown) {keynum=-1;if (e.which) { keynum=e.which;}else if (window.event) { keynum=e.keyCode;}if (isDown && keynum==32) alert("Spacebar!"); // Test 1if (keynum==38) { // Arrow-up keyDown[0]=isDown;}else if (keynum==39) { // Arrow-right keyDown[1]=isDown;}else if (keynum==40) { // Arrow-down keyDown[2]=isDown;}else if (keynum==37) { // Arrow-left keyDown[3]=isDown;}else if (keynum==32) { // Spacebar keyDown[4]=isDown; if (isDown) alert("Spacebar!"); // Test 2}else if (keynum==80) { // P-key keyDown[5]=isDown;}} The function is called in the body-ellement: <body onkeydown="keys(event,true)" onkeyup="keys(event,false)"><!-- Body contents... --></body> Like you can see, when a button is pressed (or released) this is stored in the array. Thismakes it possible for functions to see if a key is being hold at any time (yes, maybe there are other ways to do this). But this combinations do not work (push the keys in the order I give them):1) Press the right and down-arrow;2) Press the spacebar; On my computer the spacebar is not detected, when trying this combination. This combination doesn't work either:1) Press the left and up-arrow;2) Press the spacebar; I really want the spacebar to work! Even the alert boxes do not show up when trying this.I tried this in Firefox en Chrome. Both browsers do not detect the spacebar when pressed. Is there something wrong with the script, or is it a javascript bug? Thanks in advance!
  12. For example, if you select the option with id="chocolate-yes" or id="vanilla-yes", the the option with id="icecreamcone-yes" will also be selected.As you can see on the image below, when you select the option with id="chocolate-yes", <select id="icecreamcone"> will be disabled. When both id="chocolate-yes" and id="vanilla-yes" are not selected the the option with id="icecreamcone-no" will not be disabled. To put it in simpler words: you always need to have an ice cream cone if you want to add vanilla or chocolate ice cream, with the exception of sprinkles Anyone know of a Javascript that can do this? Note 1: the option with id="sprinkles-yes" will not effect id="icecreamcone-yes".Note 2: id="icecreamcone-yes" need still be selectable prior to selecting id="vanilla-yes" or id="chocolate-yes".Note 3: id names cannot be changed, nor can you add more properties to the elements.Note 4: cannot use jQuery. <ul id="icecream" style="list-style:none;line-height:30px;"> <li> <select id="icecreamcone"> <option value="addicecreamcone">Would you like an ice cream cone?</option> <option id="icecreamcone-yes" value="yes">Yes</option> <option id="icecreamcone-no" value="no">No thanks</option> </select> </li> <li> <select id="vanilla"> <option value="addvanilla">Would you like to add vanilla ice cream?</option> <option id="vanilla-yes" value="yes">Yes</option> <option id="vanilla-no" value="no">No thanks</option> </select> </li> <li> <select id="chocolate"> <option value="addchocolate">Would you like to add chocolate ice cream?</option> <option id="chocolate-yes" value="yes">Yes</option> <option id="chocolate-no" value="no">No thanks</option> </select> </li> <li> <select id="sprinkles"> <option value="addsprinkles">Would you like to add sprinkles on top?</option> <option id="sprinkles-yes" value="yes">Yes</option> <option id="sprinkles-no" value="no">No thanks</option> </select> </li></ul>
  13. HiI need to parse a SOAP response xml and display come of the nodes values in an HTML page.I have tried to do this, but it doesn't work:<!DOCTYPE html><html><body><script>if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); }else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }<!--xmlhttp.open("GET","testing.xml",false);-->xmlhttp.open("POST","http://{server}/soap/services/ICDMS_PortalFormsIntegration/Processes/LC_GetDeployedFormsList?wsdl&lc_version=9.0.0&version=1.0",true);xmlhttp.send();xmlDoc=xmlhttp.responseXML;document.write("<table border='1'>");var x=xmlDoc.getElementsByTagName("FormType");for (i=0;i<x.length;i++) { document.write("<tr><td>"); document.write(x.getElementsByTagName("id")[0].childNodes[0].nodeValue); document.write("</td><td>"); document.write(x.getElementsByTagName("name")[0].childNodes[0].nodeValue); document.write("</td></tr>"); }document.write("</table>");</script></body></html> Can anyone help? Is there a different way I need to make the SOAP endpoint call?Thanks in advance
  14. basically what i need is:there will be box in html and 2 buttons(next and previous).i have 25 links with me.when my page loads. by default it should show 5 links and when i click next button, next 5 links should be shown and for previous viceversa.please help me.
  15. I have a basic understanding of both HTML and Javascript but am having trouble figuring out how they work together. I wrote some code where I'm trying to check to see if a local file exists... Not sure this can be done. In the example code I want to use headshotPath (file path) to see if the file in the path exists. Not sure what code to use to perform the check... <!DOCTYPE html><html lang="en"> <head> <title>Player HS Verification 3</title> </head> <body> <input type="file" name="myFile" id="file-input"> <output id="list-missing"></output> <script> document.getElementById('file-input').addEventListener('change', handleFileSelect, false); function handleFileSelect(evt) { //////////////////////// //////////////////////// var teamTri= "ARI"; var playerLastName= "Acho"; var playerFirstName = "Sam"; var fileExtention = ".tga"; var imageName = playerLastName + "_" + playerFirstName + fileExtention; var headshotPath = "file:///Volumes/GRAPHICS01/HEADSHOTS/HEADSHOTS_12/03_Production/NFL/NFL_Sized/" + teamTri + "/" + imageName; document.getElementById('list-missing').innerHTML ='<ul>' + imageName + '</ul>'; } </script> </body></html>
  16. Hey everyone! i am trying to fetch data from different file locations, every time there is a new location like this /5/3/539238_375049019231475_1212083119_n.jpg/3/0/309320_396625203733616_1897402511_n.jpg/n/i/nike.jpg I want to get data from all these locations in a single query, how do i get it? Please help me..
  17. Hi I'm a little new to JavaScript and I am trying to make a small program using an HTML5 canvas. However, when the following code is executed:function Prog(){ var self = this; this.init = function() { var d = document; self.canvas = d.getElementById("can"); self.c = self.canvas.getContext("2d");...}var p = new Prog();p.init();The code works in the other major browsers, but in opera, it throws an error saying "cannot convert self.canvas to object" or sometimes just "self.canvas is null"Thanks in advance
  18. I am creating a form that is captured and placed in an email. I have managed to do this fine with the exception of one item. when getting the value of a text area it will not maintain the user entered format. Thsi will be important when recieving the information in the email. what I need is this, when a user enters the below info in a textarea;---example---Reference line 1Reference line 2Reference line 3Reference line 4----------------- I need it to popluate in the email the same way. When I pull this infor like a normal input it comes out like this; Reference line 1Reference line 2Reference line 3Reference line 4 can anyone help? I am not able to use PHP in my environment I am working with, as I understand it now. I also do not know much about asp.net
  19. How do I use this script for multiple element which works independently on the same page, can anyone help please.. <script type="text/javascript" >$(document).ready(function() { $(".slideDiv").hide(); $(window).load(function () { $(".toggle").click(function () { $(".slideDiv").slideToggle(800);<!----change to any amount or use presets "slow" "fast" etc-----> });});});</script> The html bit: <div class="toggle"> Click To Read More</div><div class="slideDiv"> <div class="p-text-wrap-box-1-left"> <p>We are a company providing tours, siteseeing, outing and contractual service to tourist industry and includes hotels and tourists related businesses. We run a pre-booked system and we are always ready to be on the move at any given time. <a href="about.html">Read more</a> about us.</p> </div><!--ends p-text-wrap-box-1-left--></div><!--slideDiv-->
  20. Hello, I'm creating a Javascript military clock widget and everything appears to be correct as far as I can tell, but it's not working. Any ideas? Here's my code: window.onload = function time_func(){var ct = new Date();var h = ct.getHours();var m = ct.getMinutes(); setTimeout(time_func(), 1000);} var $time = {military: h + ":" + m} [then in my HTML file]<script type="text/javascript">document.write($time.military);</script>
  21. I need help getting a value from a rather complicated JSON string. I am using eval() in a javascript function called json and then doing the following on a classic ASP page: X = {"status": "ok","error": [],"method": "get_metadata","result": [{"metadata": {"med": {"action": "search", "": "0", "type": "int"},"F206": {"action": "search", "": "0", "type": "int"},"sty": {"action": "search", "": "3", "type": "int"},"F701": {"action": "search", "": "0", "type": "int"},"rtl": {"action": "mixed", "": "41.98", "type": "float"},"hev": {"action": "search", "": "0", "type": "int"},"use": {"action": "search", "": "2", "type": "int"},"rank": {"action": "mixed", "": "0.1428", "type": "float"},"dsc": {"action": "mixed", "": "ICON 4 NAVY", "type": "string"},"avl": {"action": "search", "": "46.05", "type": "float"},"whs": {"action": "mixed", "": "20.99", "type": "float"},"phs": {"action": "mixed", "": "1", "type": "int"},"ufac": {"action": "search", "": "0", "type": "int"},"dt": {"action": "mixed", "": "14701", "type": "int"},"con": {"action": "search", "": "28", "type": "int"},"cabu": {"action": "search", "": "0", "type": "int"},"col": {"action": "mixed", "": "300", "type": "int"},"out": {"action": "search", "": "0", "type": "int"}},"filepath": "ICON-4.jpg"}]} dim Meta : set Meta = json(X) 'this is done serverside I am looking to get the value for 'sty' which should be '3'. I can't wrap my head around it in ASP (and yes it has to be done in ASP) thanks
  22. OK, I have hit a snag and I want to try and make this work if I can. I am trying to add a new text field next to a current list field based on a single selected item. can anyone help me on this? I added the segments that I want this to change. *script* function DbRole(myform){if (document.myform.Accesslevel1.value=="Database Role = "){document.myform.Accesslevel1("DbRole1").setValue(""); AddFields();}} *form* <input name="Accessgroups1" type="text" size="50"> <select name="Accesslevel1"> <option value=""></option> <option value="Read">Read</option> <option value="Write">Write</option> <option value="Read/Write">Read/Write</option> <option value="Update">Update (accounting)</option> <option value="Delete">Delete (Accounting)</option> <option value="Update/Delete (Accounting)">Update/Delete (Accounting)</option> <option onChange="DbRole()" value="Database Role = ">-Database Role-</option> (**the idea is that when this last item is selected a text field will appear next to this list field**) </select> Any help would be appreciated, I am new to this but I have already managed to set up other js that works but this one escapes me at this moment.
  23. Hi all, I am using this product rotator and I am trying to make it work with various product on the same page. Is it possible to have multiple image rotators on a page? I'm doing a site that I would love to use this on, but when I add the second one, only the first one works, the rest doesn't.. Is there a way around it? I have tried adding different: id:'productImages, productImages-2, productImages-3',But still only the first one works. Can anyone please help with the re-writing of this script.Your help would be greatly appreciatedThank You -----------------------------------------------------------------------<script type="text/javascript"> $(document).ready(function(){ }); var tabber1 = new Yetii({ id: 'productImages', interval:3 }); </script>--------------------------------------------------------------------------Example can be seen and downloaded at http://www.dreamweavertutorial.co.uk/dreamweaver/video/product-image-rotator-zoomer-dreamweaver-part2.htm I have also tried using ----var $IR = jQuery.noConflict();------ but in vain
  24. I want to check the file exists or not at the path pointing at file..?? <li><a onclick="db_mcmm('../report_data_fe_nldm_completeness/DB_existence_PVT_report.html');"><h3><u>DB NLDM MCMM</u></h3></a></li> Above is snippet of code from html. The path to file is given as argument to the javascript function defined in header section of html. I want to check to if the "DB_existence_PVT_report.html" file exists or not. Javascript function in header section is as follows : <script ="text/javascript"> function db_mcmm(value) { var mcmm_file=document.getElementById('content'); mcmm_file.innerHTML= "<iframe src=" + value + " width=\"79%\" height=\"600px\"></iframe>"; } </script> Can some1 guide how i can check if file exists or not..?? I tried using ajax but didn't got how to use ajax in this.... any help will be thankful
  25. hi i have a really big problem (for me). i have a html5 animation, but actuali is just a html file with a js, this animation was created in edge from adobe, and i got some thing like this: <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=9"/><title>Ribbon</title><script type="text/javascript" charset="utf-8" src=".../muse/assets/ribbon2/Ribbon2_edgePreload.js"></script><style> .edgeLoad-EDGE-4268933 { visibility:hidden; } </style><!--Adobe Edge Runtime End--> </head><body style="margin:0;padding:0;"><div id="EDGE-4268933" "edgeLoad-EDGE-4268933" style="height: 110px"></div></body></html> so in the Ribbon2_edgePreload.js is all my animation code. so in that code i wanna make a call a function in other html and in this case is a masterpage from asp.net in my masterpage i got this function. <script type="text/javascript" > function redMaster(){ var iframe1 = document.getElementById("iframe1"); iframe1.style.display="none"; }</script> the problem is that my animation html file is in the masterpage but inside of an iframe, so when some one click on an animated button i want to hide the specific iframe with that js code but when in the master page add the referecen to the js (<script type="text/javascript" charset="utf-8" src=".../muse/assets/ribbon2/Ribbon2_edgePreload.js"></script>), something really strange happen and the masterpage is changed for the html animation code (this is in the web browser), so i wanna know is there is another way to archieve this. code in the java js (function($,Edge,compId){var Composition=Edge.Composition,Symbol=Edge.Symbol;//Edge symbol: 'stage'(function(symbolName){Symbol.bindTriggerAction(compId,symbolName,"Default Timeline",3974,function(sym,e){sym.stop();});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",3595,function(sym,e){sym.stop();});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",3703,function(sym,e){sym.stop();});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",3839,function(sym,e){sym.stop();});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",4153,function(sym,e){});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",4153,function(sym,e){sym.stop();});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",4206,function(sym,e){sym.stop();});//Edge binding endSymbol.bindTriggerAction(compId,symbolName,"Default Timeline",3500,function(sym,e){sym.stop();});//Edge binding end//custom code modification for the call of the js methodSymbol.bindElementAction(compId,symbolName,"${_Rojo}","click",function(sym,e){red();});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Verde}","click",function(sym,e){sym.play("green");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Moradoso}","click",function(sym,e){sym.play("purple2");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Morado}","click",function(sym,e){sym.play("purple1");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Azul}","click",function(sym,e){sym.play("blue");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Comisions}","click",function(sym,e){sym.play("red");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Prorrateo}","click",function(sym,e){sym.play("blue");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Catalogo}","click",function(sym,e){sym.play("green");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Ventas}","click",function(sym,e){sym.play("purple1");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Gastos}","click",function(sym,e){sym.play("purple2");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Rojo}","mouseover",function(sym,e){sym.play("red");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Comisions}","mouseover",function(sym,e){sym.play("red");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Azul}","mouseover",function(sym,e){sym.play("blue");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Prorrateo}","mouseover",function(sym,e){sym.play("blue");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Catalogo}","mouseover",function(sym,e){sym.play("green");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Verde}","mouseover",function(sym,e){sym.play("green");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Ventas}","mouseover",function(sym,e){sym.play("purple1");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Morado}","mouseover",function(sym,e){sym.play("purple1");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Gastos}","mouseover",function(sym,e){sym.play("purple2");});//Edge binding endSymbol.bindElementAction(compId,symbolName,"${_Moradoso}","mouseover",function(sym,e){sym.play("purple2");});//Edge binding end})("stage");//Edge symbol end:'stage'//=========================================================//Edge symbol: 'Symbol_1'(function(symbolName){})("Symbol_1");//Edge symbol end:'Symbol_1'//=========================================================//Edge symbol: 'Symbol_2'(function(symbolName){})("Symbol_2");//Edge symbol end:'Symbol_2'})(jQuery,AdobeEdge,"EDGE-4268933"); function red() { redMaster();} Thank in advance and sorry for my english i still learning.
×
×
  • Create New...