Results 1 to 4 of 4

Thread: Passing Javascripts values to PHP without redirecting

  1. #1

    Passing Javascripts values to PHP without redirecting

    hello... newbie here...

    i just found out how to transfer values from Javascript to my Php then to my database...

    the problem is I must pass those values without redirecting to my Php file...

    as of now, i used

    window.location = URL

    to pass my values and this of course redirects me to the Php file of the URL...

    i hope someone can help me with this....
    thanks... God Speed!

  2. #2
    SG Enthusiast FunK's Avatar
    Join Date
    Aug 2000
    Simply run adaware, spybot, ZoneAlarm, HijackThis, AVG, update windows daily, have a router, don't open e-mail, turn off action scripting, don't use P2P networks, don't violate EULAs, and wear a condom to get Windows secured.

    People say Linux is alot of work!

  3. #3
    thanks a lot for those.. but i already found those sites...

    anyway, thanks again...

    need some more help....

  4. #4
    no. no, No. NO, NO... NO! stevebakh's Avatar
    Join Date
    Aug 2002
    It sounds like you want to use AJAX programming techniques.

    There are some tutorials here. Start with week1 obviously.

    Understand that your Javascript will not be able to deal with the database directly. What you can do however, if use the XMLHttpRequest object in javascript to asynchronously contact a server side script (like PHP for example) and this can deal with your database and send back results, without the user even knowing. The page will not change, everything will happen in the background.

    Of course, don't create anything that is dependant on this behaviour. It's easy to disable javascript and you don't want your web application to break.

    Hope that's what you're looking for.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts