Jump to content

accessing a varibles.


davidja

Recommended Posts

i'm pretty good with JS and PHP. i want to beable to access my PHP/MySQL data with out the browser reloading a page. my idea was to have a link that will pop a small window which will access the php and mysql data and then pass that back to the window which it was poped from.

but i haven't got a clue how to pass data between to web browser windows. i sure it can be done. i think ive seen a script at does it for something else.

plz help

edit:

code for frames will do as well
Link to comment
Share on other sites

Use ajax to communicate with the server without a page refresh. Refer to [a href=\"http://www.ajaxfreaks.com\" target=\"_blank\"]http://www.ajaxfreaks.com[/a] for some tutorials. I think that is the best way to do what you are wanting.

However, if you want to communicate with an opened window:

[code]var win = window.open(url);[/code]

Then, manipulate the dom and variables just like you would in the current window, just put win in front...

[code]win.getElementById('mydiv').style.display = "none";[/code]

and so on.

From the opened window, you can control the opening window using window.opener in the same manner.

Do a google search and you will find a wealth of info. [a href=\"http://www.w3schools.com\" target=\"_blank\"]http://www.w3schools.com[/a] has quite a bit as well.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.