6 2515
>
Question 1: How do you set the values from server-side to a client-side
control or how do you execute a javascript function without a button click
event?
What ever asp.net control post back to your server even handler add
the following code
this.Page.RegisterStartupScript("StartupScript","< script>YourJavascriptFunctionName()</script>");
when page post back this method will be called on page load, if needed , you
can also pass value to your javascripr function from server side.
like below
this.Page.RegisterStartupScript("StartupScript","< script>YourJavascriptFunctionName('param1',
'param2')</script>");
Question 2: How do you get response from a Confirm() popup window to
uncheck all server-side checkboxes placed in a panle of a web user
control?
since you are return true or false in your confirmation , your delete button
event handler will be called back upon true,
there you can write your checkbox selection logic.
"den 2005" <de*****@discussions.microsoft.comwrote in message
news:84**********************************@microsof t.com...
Hi everybody,
Question 1: How do you set the values from server-side to a client-side
control or how do you execute a javascript function without a button click
event?
Question 2: How do you get response from a Confirm() popup window to
uncheck all server-side checkboxes placed in a panle of a web user
control?
I am using ASP.Net 2.0, Thanks. Need info...
Question 1: -
<td id="mam" height="180">
-
<iframe id="NewsBody_rich" src="includes/MsgBody.htm"
-
width="100%" height="100%"
-
onblur="fillTxt()" style="font-family:
-
Arial"></iframe>
-
</td>
-
//Javascript function to be executed
-
function setTxt(szText)
-
{
-
var State = new Object()
-
var aa;
-
NewsBody_rich.document.body.innerHTML = szText;
-
}
-
Question 2:
Thanks in advanced..
den2005
--
MCP Year 2005, Philippines
Thanks Baski for replying...
I tried what you suggested in question 1, it's not working, what is wrong
with this?
Inside Parent user control:
RichTextEditor1.SetEditorContent(dr["Contents"].ToString());
Inside RichTextEditor user control class:
public void SetEditorContent(string contents)
{
this.EditorContent = contents;
//Page.ClientScript.RegisterClientScriptBlock(this.G etType(),
"RunFunction", "setTxt('" + contents + "')");
Page.RegisterStartupScript("StartupScript", "setTxt('" + contents +
"')");
}
The second question has been resolved in another post on this same forum.
--
MCP Year 2005, Philippines
"Baski" wrote:
Question 1: How do you set the values from server-side to a client-side
control or how do you execute a javascript function without a button click
event?
What ever asp.net control post back to your server even handler add
the following code
this.Page.RegisterStartupScript("StartupScript","< script>YourJavascriptFunctionName()</script>");
when page post back this method will be called on page load, if needed , you
can also pass value to your javascripr function from server side.
like below
this.Page.RegisterStartupScript("StartupScript","< script>YourJavascriptFunctionName('param1',
'param2')</script>");
Question 2: How do you get response from a Confirm() popup window to
uncheck all server-side checkboxes placed in a panle of a web user
control?
since you are return true or false in your confirmation , your delete button
event handler will be called back upon true,
there you can write your checkbox selection logic.
"den 2005" <de*****@discussions.microsoft.comwrote in message
news:84**********************************@microsof t.com...
Hi everybody,
Question 1: How do you set the values from server-side to a client-side
control or how do you execute a javascript function without a button click
event?
Question 2: How do you get response from a Confirm() popup window to
uncheck all server-side checkboxes placed in a panle of a web user
control?
I am using ASP.Net 2.0, Thanks. Need info...
Question 1: -
<td id="mam" height="180">
-
<iframe id="NewsBody_rich" src="includes/MsgBody.htm"
-
width="100%" height="100%"
-
onblur="fillTxt()" style="font-family:
-
Arial"></iframe>
-
</td>
-
-
//Javascript function to be executed
-
function setTxt(szText)
-
{
-
var State = new Object()
-
var aa;
-
NewsBody_rich.document.body.innerHTML = szText;
-
}
-
Question 2:
Thanks in advanced..
den2005
--
MCP Year 2005, Philippines
Baski,
I try to follow what you suggested as answer in question # 1, but it's
not working, Am I missing something or not doing it right?
Inside Parent User Control:
RichTextEditor1.SetEditorContent(dr["Contents"].ToString());
Inside RichTextEditor user control:
public void SetEditorContent(string contents)
{
this.EditorContent = contents;
//Page.ClientScript.RegisterClientScriptBlock(this.G etType(),
// "RunFunction", "setTxt('" + contents + "')");
Page.RegisterStartupScript("StartupScript", "setTxt('" + contents +
"')");
}
The second question has been answered in another post on this same forum.
Dennis
--
MCP Year 2005, Philippines
"Baski" wrote:
Question 1: How do you set the values from server-side to a client-side
control or how do you execute a javascript function without a button click
event?
What ever asp.net control post back to your server even handler add
the following code
this.Page.RegisterStartupScript("StartupScript","< script>YourJavascriptFunctionName()</script>");
when page post back this method will be called on page load, if needed , you
can also pass value to your javascripr function from server side.
like below
this.Page.RegisterStartupScript("StartupScript","< script>YourJavascriptFunctionName('param1',
'param2')</script>");
Question 2: How do you get response from a Confirm() popup window to
uncheck all server-side checkboxes placed in a panle of a web user
control?
since you are return true or false in your confirmation , your delete button
event handler will be called back upon true,
there you can write your checkbox selection logic.
"den 2005" <de*****@discussions.microsoft.comwrote in message
news:84**********************************@microsof t.com...
Hi everybody,
Question 1: How do you set the values from server-side to a client-side
control or how do you execute a javascript function without a button click
event?
Question 2: How do you get response from a Confirm() popup window to
uncheck all server-side checkboxes placed in a panle of a web user
control?
I am using ASP.Net 2.0, Thanks. Need info...
Question 1: -
<td id="mam" height="180">
-
<iframe id="NewsBody_rich" src="includes/MsgBody.htm"
-
width="100%" height="100%"
-
onblur="fillTxt()" style="font-family:
-
Arial"></iframe>
-
</td>
-
-
//Javascript function to be executed
-
function setTxt(szText)
-
{
-
var State = new Object()
-
var aa;
-
NewsBody_rich.document.body.innerHTML = szText;
-
}
-
Question 2:
Thanks in advanced..
den2005
--
MCP Year 2005, Philippines
What error you got ? if you didn't get error , can you please uncheck
Disable Script Debugging (Ie and other) in IE's tools->iption->Advanced tab,
and rerun your application. It seems like you should get object not defined
error from javascript.
"den 2005" <de*****@discussions.microsoft.comwrote in message
news:F3**********************************@microsof t.com...
Thanks Baski for replying...
I tried what you suggested in question 1, it's not working, what is wrong
with this?
Inside Parent user control:
RichTextEditor1.SetEditorContent(dr["Contents"].ToString());
Inside RichTextEditor user control class:
public void SetEditorContent(string contents)
{
this.EditorContent = contents;
//Page.ClientScript.RegisterClientScriptBlock(this.G etType(),
"RunFunction", "setTxt('" + contents + "')");
Page.RegisterStartupScript("StartupScript", "setTxt('" + contents +
"')");
}
The second question has been resolved in another post on this same forum.
--
MCP Year 2005, Philippines
"Baski" wrote:
>
Question 1: How do you set the values from server-side to a
client-side
control or how do you execute a javascript function without a button
click
event?
What ever asp.net control post back to your server even handler add the following code
this.Page.RegisterStartupScript("StartupScript"," <script>YourJavascriptFunctionName()</script>"); when page post back this method will be called on page load, if needed , you can also pass value to your javascripr function from server side.
like below
this.Page.RegisterStartupScript("StartupScript"," <script>YourJavascriptFunctionName('param1', 'param2')</script>");
Question 2: How do you get response from a Confirm() popup window to
uncheck all server-side checkboxes placed in a panle of a web user
control?
since you are return true or false in your confirmation , your delete button event handler will be called back upon true, there you can write your checkbox selection logic.
"den 2005" <de*****@discussions.microsoft.comwrote in message news:84**********************************@microso ft.com...
Hi everybody,
Question 1: How do you set the values from server-side to a
client-side
control or how do you execute a javascript function without a button
click
event?
Question 2: How do you get response from a Confirm() popup window to
uncheck all server-side checkboxes placed in a panle of a web user
control?
I am using ASP.Net 2.0, Thanks. Need info...
Question 1: -
<td id="mam" height="180">
-
<iframe id="NewsBody_rich"
-
src="includes/MsgBody.htm"
-
width="100%" height="100%"
-
onblur="fillTxt()" style="font-family:
-
Arial"></iframe>
-
</td>
-
//Javascript function to be executed
-
function setTxt(szText)
-
{
-
var State = new Object()
-
var aa;
-
NewsBody_rich.document.body.innerHTML = szText;
-
}
-
Question 2:
Thanks in advanced..
den2005
--
MCP Year 2005, Philippines
Baski,
Where exectly would I expect to see the error, in browser window, or
Event viewer, I uncheck the Disable Script Debugging (Ie and other) and rerun
application, still no change...what do you meant by "you should get object
not defined error from javascript" exactly? I am not getting this error
message in browser window or event viewer...
--
MCP Year 2005, Philippines
"Baski" wrote:
What error you got ? if you didn't get error , can you please uncheck
Disable Script Debugging (Ie and other) in IE's tools->iption->Advanced tab,
and rerun your application. It seems like you should get object not defined
error from javascript.
"den 2005" <de*****@discussions.microsoft.comwrote in message
news:F3**********************************@microsof t.com...
Thanks Baski for replying...
I tried what you suggested in question 1, it's not working, what is wrong
with this?
Inside Parent user control:
RichTextEditor1.SetEditorContent(dr["Contents"].ToString());
Inside RichTextEditor user control class:
public void SetEditorContent(string contents)
{
this.EditorContent = contents;
//Page.ClientScript.RegisterClientScriptBlock(this.G etType(),
"RunFunction", "setTxt('" + contents + "')");
Page.RegisterStartupScript("StartupScript", "setTxt('" + contents +
"')");
}
The second question has been resolved in another post on this same forum.
--
MCP Year 2005, Philippines
"Baski" wrote:
Question 1: How do you set the values from server-side to a
client-side
control or how do you execute a javascript function without a button
click
event?
What ever asp.net control post back to your server even handler
add
the following code
this.Page.RegisterStartupScript("StartupScript","< script>YourJavascriptFunctionName()</script>");
when page post back this method will be called on page load, if needed ,
you
can also pass value to your javascripr function from server side.
like below
this.Page.RegisterStartupScript("StartupScript","< script>YourJavascriptFunctionName('param1',
'param2')</script>");
Question 2: How do you get response from a Confirm() popup window to
uncheck all server-side checkboxes placed in a panle of a web user
control?
since you are return true or false in your confirmation , your delete
button
event handler will be called back upon true,
there you can write your checkbox selection logic.
"den 2005" <de*****@discussions.microsoft.comwrote in message
news:84**********************************@microsof t.com...
Hi everybody,
Question 1: How do you set the values from server-side to a
client-side
control or how do you execute a javascript function without a button
click
event?
Question 2: How do you get response from a Confirm() popup window to
uncheck all server-side checkboxes placed in a panle of a web user
control?
I am using ASP.Net 2.0, Thanks. Need info...
Question 1: -
<td id="mam" height="180">
-
<iframe id="NewsBody_rich"
-
src="includes/MsgBody.htm"
-
width="100%" height="100%"
-
onblur="fillTxt()" style="font-family:
-
Arial"></iframe>
-
</td>
-
-
//Javascript function to be executed
-
function setTxt(szText)
-
{
-
var State = new Object()
-
var aa;
-
NewsBody_rich.document.body.innerHTML = szText;
-
}
-
Question 2:
Thanks in advanced..
den2005
--
MCP Year 2005, Philippines
I thought you might get java script error in pop up browser window. ON your
javasctip function try to add alert message as first line and make sure it
got executed. If it shows the alert message , set the break point in your
javascript function and debug.
"den 2005" <de*****@discussions.microsoft.comwrote in message
news:D3**********************************@microsof t.com...
Baski,
Where exectly would I expect to see the error, in browser window, or
Event viewer, I uncheck the Disable Script Debugging (Ie and other) and
rerun
application, still no change...what do you meant by "you should get object
not defined error from javascript" exactly? I am not getting this error
message in browser window or event viewer...
--
MCP Year 2005, Philippines
"Baski" wrote:
>What error you got ? if you didn't get error , can you please uncheck Disable Script Debugging (Ie and other) in IE's tools->iption->Advanced tab, and rerun your application. It seems like you should get object not defined error from javascript. "den 2005" <de*****@discussions.microsoft.comwrote in message news:F3**********************************@microso ft.com...
Thanks Baski for replying...
I tried what you suggested in question 1, it's not working, what is
wrong
with this?
Inside Parent user control:
RichTextEditor1.SetEditorContent(dr["Contents"].ToString());
Inside RichTextEditor user control class:
public void SetEditorContent(string contents)
{
this.EditorContent = contents;
//Page.ClientScript.RegisterClientScriptBlock(this.G etType(),
"RunFunction", "setTxt('" + contents + "')");
Page.RegisterStartupScript("StartupScript", "setTxt('" +
contents +
"')");
}
The second question has been resolved in another post on this same
forum.
--
MCP Year 2005, Philippines
"Baski" wrote:
Question 1: How do you set the values from server-side to a
client-side
control or how do you execute a javascript function without a button
click
event?
What ever asp.net control post back to your server even handler add the following code
this.Page.RegisterStartupScript("StartupScript"," <script>YourJavascriptFunctionName()</script>"); when page post back this method will be called on page load, if needed , you can also pass value to your javascripr function from server side.
like below
this.Page.RegisterStartupScript("StartupScript"," <script>YourJavascriptFunctionName('param1', 'param2')</script>");
Question 2: How do you get response from a Confirm() popup window
to
uncheck all server-side checkboxes placed in a panle of a web user
control?
since you are return true or false in your confirmation , your delete button event handler will be called back upon true, there you can write your checkbox selection logic.
"den 2005" <de*****@discussions.microsoft.comwrote in message news:84**********************************@microso ft.com...
Hi everybody,
Question 1: How do you set the values from server-side to a
client-side
control or how do you execute a javascript function without a button
click
event?
Question 2: How do you get response from a Confirm() popup window
to
uncheck all server-side checkboxes placed in a panle of a web user
control?
I am using ASP.Net 2.0, Thanks. Need info...
Question 1: -
<td id="mam" height="180">
-
<iframe id="NewsBody_rich"
-
src="includes/MsgBody.htm"
-
width="100%" height="100%"
-
onblur="fillTxt()" style="font-family:
-
Arial"></iframe>
-
</td>
-
//Javascript function to be executed
-
function setTxt(szText)
-
{
-
var State = new Object()
-
var aa;
-
NewsBody_rich.document.body.innerHTML = szText;
-
}
-
Question 2:
Thanks in advanced..
den2005
--
MCP Year 2005, Philippines
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: billrdio |
last post by:
I am trying to make a JavaScript animation of real-time images - i.e.
images that will periodically change on the server. The problem I am
having is that the JavaScript animation I have created is...
|
by: Guillaume CABANAC |
last post by:
Hi everybody,
Does anybody know how to access a remote database (say Oracle) from
JavaScript code (within a Firefox Extension) ?
I know ADO via ActiveX in the IE world and think a similar...
|
by: Prescott |
last post by:
I want to execute a javascript function that will set a value in the
parent window from the child widow where its called and then post the
form to the server. I seem to be able to execute one or...
|
by: Keith |
last post by:
I have a web form that contains a repeater control that is designed to ask
like a check book register. Clicking on a certain transaction takes the user
to a different .aspx page where it can be...
|
by: Keith |
last post by:
I have a web form that contains a repeater control that is designed to ask
like a check book register. Clicking on a certain transaction takes the user
to a different .aspx page where it can be...
| |
by: den2005 |
last post by:
Hi everybody,
I am confused and still looking why this codes is not working. Can anyone notice or know why this code is not working? Thanks in advance.
Code working:
<form id="form1"...
|
by: Nathan Sokalski |
last post by:
I add several JavaScript events (onchange, onkeypress, etc.) to Controls
using the Add method of the Attributes collection. However, if the
JavaScript code contains certain characters, such as & or...
|
by: KRISHNA PRAVI |
last post by:
the error is "runtime error object expected" here is the code.......................................................................................
<script language="javascript"...
|
by: archana |
last post by:
Hi all,
i am having one user control. what i want is to add javascript which
will gets called on button click of user control.
but user control is not working if i add javascript in user...
|
by: pankajsingh5k |
last post by:
Dear All,
Please help me...
I had read an article to lazy load a tab in a tabcontainer using an update panel on
http://mattberseth.com/blog/2007/07/how_to_lazyload_tabpanels_with.html
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |