www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] i need help

  1. #1
    Join Date
    Jan 2013
    Posts
    2

    resolved [RESOLVED] i need help

    im developing a PHP program and im stuck and need help i have my files stored on my webhost file manager in the same folder.

    i have built my PHP files so they connect to each other example

    <form method="POST" action="/classes/js/test/test/test.php">
    <p><strong>Logged in as test@yahoo.co.uk | <a href="/classes/js/test/test/test.php" target="_blank">New Run</a> | <a href="/classes/js/test/test/sessionclosed.html?salir=1">LOGOUT</a></strong></p>

    once LOG OUT is clicked it redirects to my sessionclosed.html that i made.

    but there is a button called Buy PET <input value="Buy PET" type="submit" once button is clicked it just refreshes the page and doesn't do nothing but refresh

    i need this <input value="Buy PET" type="submit" button to connect to a server and execute java script

    i have a program already that is identical to the one im trying to build and once the buy pet button i clicked it preforms the action (mine doesn't)

    also on the origional script once the BUY PET button is clicked this is at the bottom of page source

    </pre><script type="text/javascript"><!--
    if(document.getElementById('u')) document.getElementById('u').focus();
    //--></script>
    </body>
    </html>

    i know what .document is but i don't have the original file so i cant tell it to do what i need it to

  2. #2
    Join Date
    Mar 2005
    Location
    Behind you...
    Posts
    1,012
    You are missing a lot of information that would be useful in resolving your issue. Frankly I'm not even sure where to begin given how little information I have...

    The 'Buy PET' button is a submit button, this means the action it preforms is based on its parent <form> element. So not having any code or information on the <form> element and its action value it's not really possible to tell you why your button doesn't work properly.

    Also the little code snippet you added containing a line of javascript doesn't appear relevant in any obvious way. All that code would do is set focus on some element if it exist on the page. The element would more than likely be some sort of textbox or textarea since this is typically the most common use for that method.


    So if you can provide more information perhaps I, or someone else, could help you with your problem. But as of right now there is a lot of useful information missing that would be needed to help you.

  3. #3
    Join Date
    Jan 2013
    Posts
    2
    okay thanks for your reply ,my program is incomplete but you can assess it here

    http://1110.site40.net/classes/js/ada/adam/login.php

    this is a test , you can click the login button (no need to enter email or password) then when it goes to my 2nd .php click buy pet and will just refresh the page. how ever if you try to access the directory. ie http://1110.site40.net/classes/js/ you wont get through ,i have added redirects so users have no access to my server files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles