Results 1 to 2 of 2

Thread: Tags and forms in php

  1. #1
    Join Date
    Feb 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tags and forms in php

    Dear sir,

    I created 3 tags and 3 different forms in each tags. While i am clicking second form and submit button on second tag , after submitting its going again to first tab. How can we stop that and stay on same tab.?

    Please Explain...

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You will need to provide a link so we can help you.

    Generally, I think the problem is that you are trying to use Javascript and PHP in the wrong way: submitting a form makes the page reload. And when the page reloads, it resets the tabs.

    You could try three things:
    1. Use different pages for each tab.
    2. Submit the page using an indication in the URL like #tab2 so that Javascript will set the page to the tab you want.
    3. Use AJAX to submit the form and the page will not need to reload. This is difficult, but it would be a good solution.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

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