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, 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

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

[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

The End.