Click here to Skip to main content
15,892,927 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Trouble in using Master page and javascript ??? Pin
iamrashida8324-Nov-06 9:33
iamrashida8324-Nov-06 9:33 
GeneralRe: Trouble in using Master page and javascript ??? Pin
vicky45725-Nov-06 14:05
vicky45725-Nov-06 14:05 
AnswerRe: Trouble in using Master page and javascript ??? Pin
Grapes-R-Fun24-Nov-06 14:15
Grapes-R-Fun24-Nov-06 14:15 
GeneralRe: Trouble in using Master page and javascript ??? Pin
vicky45725-Nov-06 14:01
vicky45725-Nov-06 14:01 
GeneralHere is the code ... Pin
vicky45725-Nov-06 14:02
vicky45725-Nov-06 14:02 
GeneralCode again... Pin
vicky45725-Nov-06 14:04
vicky45725-Nov-06 14:04 
GeneralRe: Code again... Pin
Grapes-R-Fun27-Nov-06 4:18
Grapes-R-Fun27-Nov-06 4:18 
GeneralStill having problem... Pin
vicky45727-Nov-06 12:06
vicky45727-Nov-06 12:06 
Nila,

I have tried the simpliest Javascript function. Still no luck... Here is what I did:

---Master page : include ..script type="text/javascript" src="Test.js" .. in the head tag.

---Child page: within Content tag, only have one button named Button1, then onclientclick event call "return TestForm(aspnetForm);", where aspnetForm is the form name I got from rendered HTML page by viewing source.

---Test.js file: Only one function which should take aspnetForm as parameter and do a simple alert Button1's value:

function TestForm(form) {
with (form) {
alert (_ctl0:ContentPlaceHolder1:Button1.value);
return false;
}
}

where _ctl0:ContentPlaceHolder1:Button1 is the Button1's name I got form rendered HTML page by viewing source.

Basically, what I try to do is to include a .js file in master page, then pass form into a javascript function,finally access the controls in the form to check some controls's value and do data validation.

I really have no idea what is wrong with this simple test... Could you tell what I am missing? I really appreciate your help!
Thanks a lot!


GeneralRe: Still having problem... Pin
Grapes-R-Fun28-Nov-06 2:26
Grapes-R-Fun28-Nov-06 2:26 
GeneralRe: Trouble in using Master page and javascript ??? Pin
Grapes-R-Fun27-Nov-06 4:09
Grapes-R-Fun27-Nov-06 4:09 
AnswerRe: Trouble in using Master page and javascript ??? Pin
Anshuman Singh24-Nov-06 19:20
Anshuman Singh24-Nov-06 19:20 
AnswerRe: Trouble in using Master page and javascript ??? Pin
ayeleteric24-Nov-06 20:45
ayeleteric24-Nov-06 20:45 
QuestionReport Viewer control Pin
bzrocker24-Nov-06 6:24
bzrocker24-Nov-06 6:24 
QuestionIsPostBack and NotIsPostBack Pin
saravanan0524-Nov-06 5:32
saravanan0524-Nov-06 5:32 
AnswerRe: IsPostBack and NotIsPostBack Pin
Not Active24-Nov-06 5:39
mentorNot Active24-Nov-06 5:39 
AnswerRe: IsPostBack and NotIsPostBack Pin
Britney S. Morales24-Nov-06 11:17
Britney S. Morales24-Nov-06 11:17 
AnswerRe: IsPostBack and NotIsPostBack Pin
GaryWoodfine 24-Nov-06 23:48
professionalGaryWoodfine 24-Nov-06 23:48 
Questionprint wide hmtl Pin
tiagodll24-Nov-06 4:48
tiagodll24-Nov-06 4:48 
AnswerRe: print wide hmtl Pin
Not Active24-Nov-06 5:44
mentorNot Active24-Nov-06 5:44 
AnswerRe: print wide hmtl Pin
Dominic Pettifer24-Nov-06 13:32
Dominic Pettifer24-Nov-06 13:32 
Questionpaging Pin
ravikiranreddydharmannagari24-Nov-06 1:47
ravikiranreddydharmannagari24-Nov-06 1:47 
AnswerRe: paging Pin
Guffa24-Nov-06 2:19
Guffa24-Nov-06 2:19 
AnswerRe: paging Pin
sam L25-Nov-06 21:02
sam L25-Nov-06 21:02 
QuestionDropdown list problem Pin
Imran Khan Pathan24-Nov-06 1:01
Imran Khan Pathan24-Nov-06 1:01 
AnswerRe: Dropdown list problem Pin
RaviJJain24-Nov-06 1:43
RaviJJain24-Nov-06 1:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.