Jump to content

[SOLVED] Combine Field Values into an Alert


TRI0N

Recommended Posts

Well knowing how to do this will be nice to know even for other aspects of things I will need to accomplish.

 

alert('Date is: '+ step3.d_month.value +'/'+ setp3.d_day.value +'/'+ step3.d_year.value) ;

Okay now why does this not work?

Link to comment
Share on other sites

Well knowing how to do this will be nice to know even for other aspects of things I will need to accomplish.

 

alert('Date is: '+ step3.d_month.value +'/'+ setp3.d_day.value +'/'+ step3.d_year.value) ;

Okay now why does this not work?

 

I assumed 'step3' is your form name.

Please try this:

document.step3.d_month.value;

 

hope this work

Link to comment
Share on other sites

Well yes that will work but not what I need.

 

alert('Date is: '+ step3.d_month.value ) ; //WORKS

 

alert('Date is: '+ step3.d_month.value +' Month') ; //WORKS

 

alert('Date is: '+ step3.d_month.value +'/'+ setp3.d_day.value +'/'+ step3.d_year.value) ; //DOES NOT WORK

 

It should create an Alert that says:

 

Date is: 05/22/2007

 

 

 

Link to comment
Share on other sites

i have just created this on my system and it works

var tday = "22";
var tmonth = "05";
var tyear = "2007";
alert ("Date is: " + tday + "/" + tmonth + "/" + tyear);

 

so as long as you variables work then change the t variables in mine with your own and all things being equal it should work fine, I realise it is not different from yours, I had trouble to start with but the javascript error console in firefox is a great tool

Link to comment
Share on other sites

OMG! I can't believe I overlooked that.  I was down to thinking it just had something to do with a limit on creating static text with dynamic form input.

 

 

Thanks for point that out.. OMG..  (crawls under a rock to die)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.