6 2393
>
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 discussion thread is closed Replies have been disabled for this discussion. Similar topics
2 posts
views
Thread by billrdio |
last post: by
|
4 posts
views
Thread by Guillaume CABANAC |
last post: by
|
reply
views
Thread by Prescott |
last post: by
|
reply
views
Thread by Keith |
last post: by
|
reply
views
Thread by Keith |
last post: by
| |
11 posts
views
Thread by Nathan Sokalski |
last post: by
| |
4 posts
views
Thread by archana |
last post: by
| | | | | | | | | | | |