Hi guys, I have a problem on my php code and url passing. [B]What it should do:[/B] There are 3 forms of the php file, the [B]"email"[/B], [B]"item1"[/B] and [B]"item2"[/B]. The [B]email form[/B] is hidden by default on page load, it will only be visible if any of the [B]item1[/B] or [B]item2[/B] submit buttons is clicked and the two other forms will become hidden. The user will choose which item to click, then the [B]email form[/B] will display, then the user will enter their email address, when they click the button, they should be redirected to the page that they …

Member Avatar
Member Avatar
+0 forum 7

Hi guys, I am new here in the community. I need help on how to pass a javascript variable value to a php variable.. I am using jquery to hide form1 when the page loads. My first javascript is working fine. my code is like this: [CODE] <script type="text/javascript"> $(document).ready(function(){ $('#email').hide(); }); </script> [/CODE] and here is my php code below: [CODE] <?php $url = ''; ?> <form id="form1" method="post" action="<?=$url?>"> <label>E-Mail: <input type="text" name="email" /> <input type="submit" name="go" value="Go" /> </label> </form> <form id="form2" method="post"> <label>Test: <input type="submit" name="test" /></label> </form> [/CODE] then in this code below, I want …

Member Avatar
Member Avatar
+0 forum 6

I'm trying to include a widget in my page that looks and behaves like the Google calendar or Outlook calendar. Is there such a widget in Dojo? I have found [url]http://unscriptable.com/code/dojocal/dojocalTest.html[/url] but I don't know where to download it. I tried to contact the author but I got no answer. Any ideas or suggestions? Thank you

Member Avatar
+0 forum 0

[ICODE]<html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>PicNet Table Filter Demo</title> <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js" type="text/javascript"></script> <script type="text/javascript" src="picnet.table.filter.min.js"></script> <script type="text/javascript"> $(document).ready(function() { // Randomly Create Data Rows for (var i = 0; i < 50; i++) { var tr = $("<tr>" + "<td>Value" + Math.floor(Math.random() * 500) + "</td>" + "<td>" + Math.floor(Math.random() * 500) + " </td>" + "<td>" + (Math.random() > 0.5 ? "yes" : "no") + "</td>" + "<td>" + (Math.random() <= 0.333 ? "Item 1" : Math.random() > 0.5 ? "Item 2" : "Item 3") + "</td>" + "<td></td>" + "<td>" + parseInt(10 + Math.random() * 18) + "/" + …

Member Avatar
Member Avatar
+0 forum 5

Hello, I build a 3 steps form with jQuery slider, step 1 is contact information, step 2 some options and at step 3 I want to create a summery of this form. To be more clear, you got at step 3 by a "next step" button and I want to display the summary before they click on submit. Anyone can help with this? Best!

Member Avatar
+0 forum 0

Hai Friends........ I want program code only using html and javascript. First I took one form and created some data on it like name:xyz address:hyderabad country:india. hobbies:reading,cooking. submit button. Above is one simple form after submit i want it to display it in another page like out.html. so what can i do please send me code only in javascript and html

Member Avatar
Member Avatar
+0 forum 1

Hi, I am a PHP developer I never learned much JS but there is no way to accomplish this function using only PHP without a refresh. I am trying to adapt a script that did the basics. [CODE] <script language="JavaScript"> function som() { var First, Last, Full; First = document.Credit.First.value; Last = document.Credit.Last.value; Full = document.Credit.Full.value; document.Credit.Full.value = (First / Last); } </script> [/CODE] My page is a dynamic php page using MySQL and I have created the JS using concatenation of strings in a loop for those items pulled from the DB table where sts==1 - this is really …

Member Avatar
Member Avatar
+0 forum 4

Hello all. I have an web site that have different themes. I want to build a script in javascript that get as a parameter a color in hexadecimal format ex: #ff0000 and return some suggested color . as this example color generate must to combinate with red color. also the user should give and the number as needed. function color_generate($color , $number_of_colors_generate) { ..... }

Member Avatar
+0 forum 0

hi want to learn javascript and i'm using ubuntu 9.04.i have google chrome and fire fox with enabled javascript. All things are good but when i write a js file and open it in browser but nothing happening html code loads but js not any hint why .

Member Avatar
Member Avatar
+0 forum 2

Ok I'm javascript newbie and I have to make script for displaying random images after click on dice picture. The problem is that the script shows only only 1 picture after the clcik and it won't continue with the next random images. [CODE]<html> <head> <script type="text/javascript"> function randomize(){ var delay = 1500; var imgs = new Array( ); imgs[0] = "0.jpg"; imgs[1] = "00.jpg"; imgs[2] = "01.jpg"; imgs[3] = "02.jpg"; imgs[4] = "03.jpg"; imgs[5] = "04.jpg"; var preload = new Array(); for(n=0; n<imgs.length; n++) { preload[n]=new Image(); preload[n].src=imgs[n]; } var randomg = Math.round( Math.random( ) * 6 ); if(randomg>=0 && …

Member Avatar
Member Avatar
+0 forum 2

Hello again! I need your help again, people! =) So here's my problem: This line replaces only the first "\n" spec. character in my textarea, and this way everything's screwed up... I'm sending the replaced content of the textarea through AJAX to the server, in a GET method. I've tried to just comment out this line to see whether this is necesarry, but then no "\n" is transferred at all... I'm using a PHP server side, and that works. Code: [CODE]var content=document.getElementById("editor").value; content=content.replace("\n", "%nline!");[/CODE] Or maybe should I split up the value of the textarea by "\n", and GET it …

Member Avatar
Member Avatar
+0 forum 4

Hello everybody! I have a serious problem with my diploma work! So here it is: My ajax.js file cannot be executed. It does nothing when I click on the buttons... Here's the ajax.js code:4 [CODE] function opensave(type){ url="open.php"; content=replacer("editor"); var xmlhttp=if(window.XMLHttpRequest){ new XMLHttpRequest(); } else if(){ new ActiveXObject("Microsoft.XMLHTTP"); }; xmlhttp.onreadystatechange=stateChanged(); if(type="read"){ xmlhttp.open("GET",url,true); url+="?open=r&filename="+document.getElementById("filename").value+"&extension="+document.getElementById("extension").value; xmlhttp.send(null); } else if(type="write"){ xmlhttp.open("POST",url,true); setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send("open=w&filename="+document.getElementById("filename").value+"&extension="+document.getElementById("extension").value+"&content="+content); }; function stateChanged(){ if (xmlhttp.readyState==4){ processdata(xmlhttp.responseText); }; }; };//******************************************************************************************** function replacer(id){ str=document.getElementById(id).value.replace(/"/g,"%dquot%"); return str; };//******************************************************************************************** function processdata(response){ response=response.split("<!--//split-->") document.title=response[0]; content=response[1].replace("%dq", /"/q); document.getElementById("editor").innerHTML=content; };//******************************************************************************************** [/CODE] The page which is linked to, doesn't want to "call" it. These methods were implemented …

Member Avatar
Member Avatar
+0 forum 8

[CODE=AJAX] function update(value1) { doAjax("behind_scan.php" , "id="+value1); } function doAjax(url , str ) { xmlhttp=GetXmlHttpObject(); if (xmlhttp==null) { alert ("Browser does not support HTTP Request"); return; } url=url+"?"+str; xmlhttp.onreadystatechange=stateChanged; xmlhttp.open("GET",url,true); xmlhttp.send(null); } function stateChanged() { if (xmlhttp.readyState==4) { //document.getElementById("txtHint").innerHTML=xmlhttp.responseText; //alert(xmlhttp.responseText) document.forms.myform.scanner.value = ""; document.forms.myform.scanner.focus(); } } function GetXmlHttpObject() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject) { // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); } return null; } [/CODE] This pages calls a function on a separate php page to run 2 mySQL queries, the value must be put …

Member Avatar
Member Avatar
+0 forum 2

Hi, I have an ajax script that sends a request to a servlet for information to be inserted into a table cell. The servlet then handles the request and replies with something like this: (I took the liberty of removing all the out.println tags) [CODE] <script language='javascript' src='whiteWine.js'></script> <table align='center' border='0'> <tr> <td align='center'> <img src='Images/Buttons/Small/left.png' id='leftButton' onclick='prevPicture()' onMouseOver="changeOver('leftButton')" onMouseOut="changeOut('leftButton')" > <img src='Images/Buttons/Small/right.png' id='rightButton' onclick='nextPicture()' onMouseOver="changeOver('rightButton')" onMouseOut="changeOut('rightButton')" > </td> </tr> <tr> <td colspan='2' align='center'> <img id='mainPicture' src='Images/Wines/White Wines/whiteWine01.png' /> </td> </tr> [/CODE] For some reason, however, all the scripts functions cannot be found on the page. If I attach the …

Member Avatar
Member Avatar
+0 forum 4

The End.