Results 1 to 4 of 4

Thread: Basic Help

  1. #1
    robjames is offline Member
    Join Date
    Feb 2009
    Rep Power

    Default Basic Help

    Hi Guys,

    I'm hoping this is a basic thing for you guys but im very new to Java.
    I got the below script given to me and although it works locally, i cant get it to work when uploaded.

    I'm assuming that its because all the other links on my site work in relation to each other where as this seems to try and load success.html and failure.html differently.

    Would really appreciate any help you can offer. The Script is below.

    Many Thanks


    <p align="center"><span class="style3">ENTER USER NAME :
    <input type="text" name="text2">
    <p align="center"> <span class="style3">ENTER PASSWORD :</span>
    <input type="password" name="text1">
    <input type="button" value="Check In" name="Submit" onclick=javascript:validate(text2.value,"wessex",t ext1.value,"hibernia") >

    <script language = "javascript">

    function validate(text1,text2,text3,text4)
    if (text1==text2 && text3==text4)
    load(a href="success.html");
    load(a href="failure.html");
    function load(url)

  2. #2
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Rep Power

    Default Java...

    robjames... this is a Java development forum... not a Javascript forum. The two are different. For example, in java, the follwing is wrong:
    Java Code:
    if (text1==text2 && text3==text4)
    In Java you don't compare strings with "=="... you use the string method "equals()". I don't know what is used for comparing strings in Javascript.
    Also check the paring of curly brackets "{}"... I count 3 opening brackets and only two closing brackets.

    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  3. #3
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Rep Power


    Sometimes people really confuse these two things as Java or JS ((( That's a pity (

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Colombo, Sri Lanka
    Blog Entries
    Rep Power


    robjames, as CJSLMAN explain in his last post this, is a Java forum. Not a JavaScritp forum. It's better to ask your question on relevant JS forum. I've close this thread. If you have any further questions on this thread contact me through PMs.

Similar Threads

  1. Need some really basic help
    By Mayur in forum New To Java
    Replies: 6
    Last Post: 01-24-2009, 07:00 AM
  2. inheritance basic.
    By newmember in forum New To Java
    Replies: 1
    Last Post: 08-02-2008, 10:35 PM
  3. basic java help
    By adred in forum New To Java
    Replies: 0
    Last Post: 03-08-2008, 01:36 PM
  4. Basic Program Please Help!!
    By VinceGuad in forum New To Java
    Replies: 3
    Last Post: 02-01-2008, 04:35 PM
  5. help with basic example
    By fred in forum New To Java
    Replies: 1
    Last Post: 07-20-2007, 06:45 PM

Posting Permissions

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