PC Review


Reply
Thread Tools Rate Thread

access hidden object from java script

 
 
Jeff User
Guest
Posts: n/a
 
      3rd Jan 2008
hi all

Using C#, .NET1.1.

I need to pass a string of text to the final html output and then
capture it with java script on the client side. I found that I can
place my string in and then access a textbox or a label from the js,
but only if the textbox or label is visible. If they are hidden (and
then need to be) then they are not created in the html output.

I also think I could access a hidden html INPUT tag, but, I dont know
how to place my string of text in an html control from the C# code.

Anyideas how I can hide a string of text from my C# and then get it
using the js?

Thanks
Jeff
 
Reply With Quote
 
 
 
 
Dina
Guest
Posts: n/a
 
      3rd Jan 2008
On Jan 3, 9:25 am, Jeff User <jen1...@hotmail.com> wrote:
> hi all
>
> Using C#, .NET1.1.
>
> I need to pass a string of text to the final html output and then
> capture it with java script on the client side. I found that I can
> place my string in and then access a textbox or a label from the js,
> but only if the textbox or label is visible. If they are hidden (and
> then need to be) then they are not created in the html output.
>
> I also think I could access a hidden html INPUT tag, but, I dont know
> how to place my string of text in an html control from the C# code.
>
> Anyideas how I can hide a string of text from my C# and then get it
> using the js?
>
> Thanks
> Jeff


Jeff,

Just place a html INPUT Hidden tag and use Runat="Server". This would
expose the hidden Html control on the server side and u can access it
just like any other server control. use the "Text" property on the
server side to put in the value and use the "value" property in the
JS.

Hope this helps.

Regards, Dina
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of java script Formula in the Access 2003 =?Utf-8?B?S2FtaWxh?= Microsoft Access 4 31st Jan 2007 09:53 AM
c# assembly access from Java script cspek Microsoft C# .NET 1 24th Feb 2005 03:43 PM
Cannot Access Site With Java Script Dick Windows XP Security 1 17th Nov 2004 07:53 PM
How to access the child control in Java Script... ? Gill Smith Microsoft ASP .NET 0 25th May 2004 07:45 PM
GroupWise Web Access Java Script Error Mike Goldin Windows XP Internet Explorer 1 24th Jan 2004 09:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:36 PM.