| 
	
 | 
 Posted by one man army on 01/19/06 10:43 
In article <yIidnQ4mD5AopVLeRVn-rw@comcast.com>, 
 Randy Webb <HikksNotAtHome@aol.com> wrote: 
 
> > * I have a very simple HTML page, with a FORM, with an INPUT TEXT 
> > * there is a button that activates some javascript 
> > * the javascript causes this to happen 
> >  
> >    // Create new JS element 
> >    var jsel = document.createElement('SCRIPT'); 
> >    jsel.type = 'text/javascript'; 
> >    jsel.src = url; 
>  
> jsel.src = url + '?' + document.getElementById('zipRaw_id').value; 
>  
> And then have PHP read the queryString. 
>> 
>>    document.body.appendChild (jsel); 
>> 
 
 since the SCRIPT element is being appended to the current pae, I am not  
sure that the PHP would see a new URL. The URL is just the same URL as  
it was before the document.body.appendChild().  
  The point here is that things chane on the page without jumpin to a  
new location, ie AJAX. I do not want to refresh the window. 
 
  I could look up the PHP built in variables that read the URL, but I  
think thats not the right direction. 
-- 
 
> So your browser's JavaScript interpreter attempts to run the output from  
> the PHP. 
>  
> Bit of a mess. 
 
  Yes, it seems Javascript  would execute the output of the PHP, but you  
don't use it that way. The point is to execute PHP as the result of a  
page event, which it does. 
 
  After the PHP executes, you get access to the set PHP vars from  
Javascript. e.g, 
 
setTextContent( getElementById_s('divZipCheckRes'),  
  '<?php echo $res; ?>' ); 
 
  I just  wish that I could access SOMETHING in the web page from within  
the PHP to get an input value. I don't know how to do that.
 
  
Navigation:
[Reply to this message] 
 |