|
Remove space in "onclick" If I post it without quotes it'll be replaced by "removed" word. Like in this:
<html>
<head>
<script language="JavaScript" type="text/javascript">
function Expand(name)
{
var elem = document.getElementById(name);
if (elem.style.display == "none")
{
elem.style.display = "block";
}
else
{
elem.style.display = "none";
}
}
</script>
</head>
<body>
<Table >
<tr>
<td>
<a href="#" onclick ="Expand('content');">click this</a>
</td>
</tr>
<tr>
<td>
<table id="content">
<tr>
<td>
line1<br/>
line2<br/>
line3
</td>
</tr>
</table>
</td>
</tr>
</body>
</html>
|
|
|
|
|
cool.. this works, now how do i do this part in C#? whats the libary for elem.style.display? or should i make it a server control?
<script language="JavaScript" type="text/javascript"><br />
function Expand(name)<br />
{<br />
var elem = document.getElementById(name);<br />
if (elem.style.display == "none")<br />
{<br />
elem.style.display = "block";<br />
<br />
}<br />
else<br />
{<br />
elem.style.display = "none";<br />
}<br />
}<br />
</script>
|
|
|
|
|
|
I have a listbox "Employee" that is pouplated with a SQL stmt. In the SQL stmt, I can SELECT ID, Name, Dept, Etc. The listbox shows the "ID - 25" and "Value -Name". I do not need to see any additional information in the listbox, but I need a javascript function to populate a textbox "Dept" with the "Dept value" that was retreived with the SQL stmt.
Ernest
|
|
|
|
|
More information required here.. Are you saying that you already have the listbox populated, and that when a users selects one of the items in the dropdown that you want that item's text data to be populated in a separate text box?
|
|
|
|
|
Correct: This list box is already populated using a SQL stmt. User can currently select an item in the dropdown.
The fields in the list box are ID=1d, and Value=Name which is displayed to user. The SQL stmt returns: ID - Name - Dept. I need an onchange event that will populate another text box "Dept" with the 3rd column of the list box "Dept".
Thanks
Ernest
|
|
|
|
|
Ok, if I understand this, what you're saying is that you have three values... the ID, the name and the Department. And now based upon which one they select, you need to populate another area with the department value.
I would create a Javascript array on the page populated when the SQL populates the dropdown. The array would contain the IDs of each dropdown associated with DEPARTMENT. On the OnChange, have the script look up the value of the selected item in the dropdown, get the department value, and populate the other area. Make sense?
|
|
|
|
|
Yep... you understand..... Thanks for the reply.....
Now I just need to find samples or figure out how to do just that..
Thanks
Ernest
|
|
|
|
|
Hi All,
Would u tell me
what are the settings needed under WinCE Registry to work the ISAPI extension DLLS?
How to do it?
Thankx in advance,
Regards,
Ramesh.
|
|
|
|
|
Hi,
I'm writing a web service using ASP.NET in VS.NET 05, I want my web service can receive the request from client and get the response (including HTML, Javascript...) from the web server. It is in the middle of web server & client.
How can I do?
Thanks,
Hung
|
|
|
|
|
Hung,
I'm guessing that no one is replying to this because it's hard to follow. Do you want your web service to simply return HTML and Javascript? What is this HTML and Javascript?
|
|
|
|
|
hi,
i've got a quick javascript question. i don't know if its possible... how can i call a function when text in a textbox is changed?
thanks in advance,
sam kline
|
|
|
|
|
Hi,
For this purpose try writing code in the textchanged event or else use an extended textbox.
Extended textboxes allow you to write delegates and events and on those events javascript functions can be called.
Code for extended text box can be found at the code project site itself.
Thanks.
|
|
|
|
|
hi all,
i got a small problem but its really annoying.
i want to use the new implicit localization feature of asp.net 2.0. i created default resource file in local resources folder say def.aspx.resx thent i created number of resources files with diff languages like def.aspx.fr-FR.resx. the defualt resource file works greate but when i change culture and uiculture to another culture say fr-FR. nothing changes and the resource file def.aspx.fr-FR didn't loaded i dont know why??? it works only when i make it as defualt resource. def.aspx.resx but changing cultrue anf uiculture doesn't work!!!!
Thanks in advance.
marcoryos
|
|
|
|
|
Hi,
I am working on a web application in ASP.net & C# .For one of the utilities on my site, i need to use an available VC++ project.
This VC++ project produces an exe as its output.
I tried changing the output type of the VC++ project to .dll, but it doesn't help and after this, the project itself stops working.
Can someone please tell me as to how to use this VC++ project into my web application?
Thanks.
|
|
|
|
|
EXE in a web page??? looks strange to me.
You can try to re-write the code for .NET itself
"He that is good with a hammer tends to think everything is a nail." - Abraham Maslow
|
|
|
|
|
What i am trying to do seems a little difficult, but i learnt that .net supports language interoperability.
"How" is the point of concern. I've tried a lot but have not been able to accomplish this task.
Using dlls is easy, but with this exe project, i'm at sea... dont know how to use it.
I'll be grateful if you can provide any useful information on this.
I hope you appreciate that rewriting an entire project would be very time consuming and complex.
Thanks.
|
|
|
|
|
You can't just convert an exe to a dll in C++ like that....they're COMPLETELY different creatures. You'd have to basically start over and take the functionality from the exe that you need, and put into a dll, but have to bear in mind that there will be no UI...
You can't run an exe in a webpage at all....you just can't do it. What you could try would be writing an ActiveX control that is installed on the client machine, together with the appropriate exe and supporting files and then use ShellExecute() to run it - though to be honest, am not even sure that would work.
.NET does support language interoperability, but only at the assembly level - ie, can use vb to talk to a c# assembly...
Unless someone more knowledgable knows anything, think this
smadan wrote: I hope you appreciate that rewriting an entire project would be very time consuming and complex.
is your only option
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
hi,
I want that when page is too long, only vertical scroller bar is display. Please send me solution with writing code.
Thanks
C Patel
|
|
|
|
|
Hi friends,
I want to remove scroll bar from web page( not disable but remove).
If this is possible the help me. and also write the code.
Thanks,
Chetan Visodiya
|
|
|
|
|
|
Hi
I am trying to access the tag values but i'm not getting the desired output.
eg: I have four tags
tag1(open tag1)
(open tag2) tag2 data /tag2 (closed tag2)
(open tag2) tag2 data /tag2 (closed tag2)
(open tag2) tag2 data /tag2 (closed tag2)
(open tag2) tag2 data /tag2 (closed tag2)
/tag1(close tag 1)
I want to retrieve data in each tag separately, means on one button click i want to display data in first tag2, for another button click the data in second tag2 and so on. Can any one help me on this? It's an urgent requirement, so pls help me to solve this.
Regards,
-- modified at 4:21 Wednesday 5th April, 2006
|
|
|
|
|
How can I reach the function Server.MapPath from a .cs file?
What do I have to include? using...
Thanx!
|
|
|
|
|
You have to get a reference to the actual page that is being created. Use HttpContext.Current.Server.MapPath().
---
b { font-weight: normal; }
|
|
|
|
|