User Profile

Collapse

Profile Sidebar

Collapse
MKO
MKO
Last Activity: Oct 10 '07, 09:04 AM
Joined: Aug 19 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • MKO
    started a topic NodeValue

    NodeValue

    Hi

    Can somebody advise if I can / how to do something like this:

    getNodeValue... ..add this to something.....t han set added value to the Node.

    Basically, the CityName displays correctly (onclick update). I have a value stored in the CityTime that equals the difference in hours between GMT/UTC and the time for the city (e.g. Frankfurt = 1).

    How do I add this to a UTCString to get the actual...
    See more | Go to post

  • MKO
    started a topic referencing onclick()

    referencing onclick()

    Hi

    Im finding this so confusing & painful to learn.

    My problem is with referencing onclick script correctly, do you use the HTML name=xyz or id=abc as the reference?

    For example, how do I correctly reference these in my onclick script:

    [HTML]
    <input name="btnShowCi tyInfo" type="button" id="btnShowCity Info" value="Show City Info" onclick="showCi tyInfo()"/></td>...
    See more | Go to post

  • MKO
    replied to Validating an email address
    thanks both,

    I read up on it as suggested and its now working. Thanks heaps.

    tj - thanks for the logic behind the expression, it really helped me understand how it is working.

    Cheers again
    See more | Go to post

    Leave a comment:


  • MKO
    started a topic Validating an email address

    Validating an email address

    Hi

    Again its probably easy, but here I am stuck on checking for these in an input.

    Can it be checked like this? Do I need to look at some other validation method for this?

    Code:
        
        if(( ! document.fmOrder.cdEmail.value == 0 ) && (does not contain an @ and one . in sequence))
        {
            errors.push("Please enter a valid email address");
        }
    ...
    See more | Go to post

  • MKO
    replied to return true / return false validation
    Thanks, that is exactly what I think I am looking for, will check it out tomorrow.

    Cheers

    M
    See more | Go to post

    Leave a comment:


  • MKO
    started a topic return true / return false validation

    return true / return false validation

    Hi

    Basically, this is the last function called and checks if there were any errors, if so it returns all the errors in one alert message, if not form should proceed on submit.

    So if there is an alert(msg) returned, I don't want the form to submit.

    Any suggestions on how to add this would be appreciated.

    [CODE=javascript]

    function addMsg(){
    alert(msg)
    msg =...
    See more | Go to post

  • MKO
    replied to Too many alert messages
    Cheers

    Now I only get one message, however it still appears even if the last one is selected.

    Do I have to ditch the loop and go for an "if / else if / else if / else" statement?

    What will give the best result?
    See more | Go to post

    Leave a comment:


  • MKO
    started a topic Too many alert messages

    Too many alert messages

    Hi

    Can anyone give advice on how to get only one alert message out of this code:

    Im hoping its an easy solution but Im stuck on it & only new to JavaScript.

    Many thanks

    M

    [CODE=html]

    <html>
    <head>
    <title>Form</title>

    <script language="JavaS cript" type="text/JavaScript">
    ...
    See more | Go to post
    Last edited by MKO; Aug 20 '07, 09:18 PM. Reason: spelling

  • MKO
    replied to Form Validation
    Hi

    It worked (you knew it would).

    Thanks again for all your help.

    Cheers

    M
    See more | Go to post

    Leave a comment:


  • MKO
    replied to Form Validation
    Hi gits

    Thanks heaps for your help. Not sure I understand fully how to do it but I'll take on board what you said and have another look at it next week.

    Again thanks

    Vielen Dank

    Bis bald
    See more | Go to post

    Leave a comment:


  • MKO
    replied to Form Validation
    Hi

    Im now confused with the if(function(... ...) part, so here goes with another 'dumb' question (it was easier learning German that JavaScript), is the correct procedure:

    Code:
    if(function(a,errMsg)) || (function(b,errMsg) etc......
    
    or something like (i.e. drop error msg until end)
    
    if(function(a,( || (function(b, (|| function(c,errMsg)))))))
    See more | Go to post

    Leave a comment:


  • MKO
    replied to Form Validation
    Hi

    I see the wrap buttons now, thanks.

    What I don't understand is the if/or part.

    I understand if(myVal > 10 || myVal <100) ..... in one statement, What I don't get is something like this:

    Which is correct?

    Code:
    if(xVal > 10) || (yVal < 100) ....
    
    or
    
    if((xVal > 10) || (yVal < 100)) ....
    I guess...
    See more | Go to post

    Leave a comment:


  • MKO
    replied to Form Validation
    Hi

    Thanks, I don't quite get it but I'll read up some more and take what you've said and hopefully I'll understand it later..... (never know).

    You mentioned to use CODE tags. What do you mean by this for future reference?

    Cheers
    See more | Go to post

    Leave a comment:


  • MKO
    replied to Form Validation
    Thanks for the reply's

    Not sure that I understand the whole && and || in the if statements yet. This is what I think your suggesting (hope I'm right):

    ....
    [CODE=javascript]
    if(isNumeric(ho mePhone, contactMsg)) || (isNumeric(mobi le,contactMsg)) || (emailValidator (email, contactMsg)){
    return = true;
    }else{
    return false;
    }[/CODE]

    Q. Can this...
    See more | Go to post
    Last edited by gits; Aug 19 '07, 12:17 PM. Reason: added CODE tags

    Leave a comment:


  • MKO
    started a topic Form Validation

    Form Validation

    Hi guys

    I'm having a little trouble with form validation, I can get the entire form to validate without problems (i.e. when all fields set to required & valid data is entered) but can't get it to work when some are required and others are optional (but one of the optional fields is required).

    I'm hoping that its something that Im overlooking but I've tried a number of ways and can't get valid results.
    ...
    See more | Go to post
    Last edited by gits; Aug 19 '07, 11:31 AM. Reason: added CODE tags
No activity results to display
Show More
Working...