[allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => splendorx webforumsuser@macromedia.com [ip] => "splendorx" web [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> Javascript Newbie - Macromedia Dreamweaver

Javascript Newbie - Macromedia Dreamweaver

I would like to add different values to form fields if the information has not been entered. With the above script it applies a value of nbsp; to both form fields, but I would like to assign a seperate value for each form field. ie. ShipDate = 07/16/2003 TrackingNo = &nbsp How would I add this functionality to javascript above? TIA Terry...

  1. #1

    Default Re: Javascript Newbie

    I would like to add different values to form fields if the information has not been entered. With the above script it applies a value of nbsp; to both form fields, but I would like to assign a seperate value for each form field. ie.

    ShipDate = 07/16/2003
    TrackingNo = &nbsp

    How would I add this functionality to javascript above?

    TIA

    Terry


    splendorx webforumsuser@macromedia.com Guest

  2. #2

    Default Re: Javascript Newbie

    I have revised the script and it works. Not sure if the code can be optimized??? If so, please let me know.

    Thanks,

    Terry
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function IsEmpty(form) {
    for(f=0;f<form.length;f++){
    if( !form[f].value && (form[f].name=="TrackingNo")){
    form[f].value="&nbsp;";
    }
    if( !form[f].value && (form[f].name=="ShipDate")){
    form[f].value="01/01/2003";
    }
    }
    }
    //-->
    </script>


    splendorx webforumsuser@macromedia.com Guest

Similar Threads

  1. Newbie help on Javascript required
    By taupirho in forum Adobe Acrobat SDK
    Replies: 0
    Last Post: October 6th, 03:38 PM
  2. newbie javascript help
    By cpanon in forum Macromedia Dynamic HTML
    Replies: 1
    Last Post: October 17th, 09:23 AM
  3. Newbie:Is Javascript validation really the best way to go?
    By Hosh in forum Coldfusion - Getting Started
    Replies: 4
    Last Post: May 23rd, 06:25 PM
  4. Newbie Javascript issue
    By Winston2 in forum Coldfusion - Getting Started
    Replies: 3
    Last Post: May 17th, 10:57 PM
  5. Replies: 1
    Last Post: May 2nd, 03:30 PM

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
  •