Questions tagged [clientscript]

86 questions
0
votes
1 answer

The value is not retained with Page.ClientScript.RegisterHiddenField in asp.net

In Asp.net c#, with this syntax: Page.ClientScript.RegisterHiddenField("hfFileName", Value); I can define a Hiddenfield: 1) Why in this code , the value is nothing: function pageLoad() { …
Sara N
  • 1,079
  • 5
  • 17
  • 45
0
votes
2 answers

At what asp.net page event are clientIDs assigned?

I want to do something like this: Panel divPanel = new Panel(); divPanel.ID = "divPanel"; this.Page.Controls.Add(divPanel); string script = "function alertID(){alert("the id is:…
user191272
  • 45
  • 1
  • 5
0
votes
1 answer

ClientScript not working properly on class C#

I want to deploy a script on C# which usually uses methods like: ClientScript.RegisterStartupScript(GetType(), "script", "Details('" + hdnId.Value + "');", true); However I wanted to make a class that runs that code: public class WebUtilities …
Victor
  • 1,108
  • 9
  • 29
  • 53
0
votes
1 answer

Create modal popup in NetSuite

I have a requirement to show modal popup on in netsuite on button click. currently I open a window using client script var url = nlapiResolveURL('SUITELET','customscript_id','customdeploy_id',null); window.open(url); Now I want to make this…
gs11111
  • 649
  • 2
  • 17
  • 49
0
votes
2 answers

Can't call alert from Server Side

In Web Forms project i need to open alert. I try to do it like this var script = Page.ClientScript; if (!script.IsClientScriptBlockRegistered(this.GetType(), "SignOffAlert")) { …
demo
  • 6,038
  • 19
  • 75
  • 149
0
votes
1 answer

Yii pack generated js code to external file

Some yii widgets generates js code (for ajax update or etc.) and this code yii puts to the end of the page. Simular behavior have yii's ClientScript::registerScript() function, i want yii to put this code to external files, and link them in the…
0
votes
1 answer

ClientScript.RegisterStartupScript pause execution rest of the code until close window

I'm using ClientScript.RegisterStartupScript(this.GetType(), "pop", newWin, true); to open popup windows. I have some code lines after this line. But I need to execute those code after closing the popup. Not immediately. Any solution? Button…
Sivakumar Piratheeban
  • 493
  • 4
  • 11
  • 39
0
votes
1 answer

Register ClientScriptBlock only once during multiple postbacks

In my asp.net websites I regular uses the following methods before actually adding either custom pieces of script or registering a js file: IsClientScriptBlockRegistered(Type, String) IsClientScriptIncludeRegistered(Type, String) When a page…
0
votes
1 answer

Calling javascript function from within code using ClientScriptManager

I have the following script tag included on the _layout page of my MVC application: This is used to issue badges on completion of courses. Thus far I have been issuing badges…
Jay
  • 3,012
  • 14
  • 48
  • 99
0
votes
1 answer

Calling ClientScript in Ajax method withhout a button is clicked in ASP.NET page

I need to call a function when an Ajax page method function returns success and without button click as protected sub. I couldn't include the ClientScript directly in the method or in shared function and the Method doesn't allow calling Public Sub…
hsobhy
  • 1,493
  • 2
  • 21
  • 35
0
votes
3 answers

Display Custom HTML in From Controller in Yii

We are using Yii for our project. I am trying to conditionally register two JS scripts/assets in the header: one for IE8 and one for other browsers - using conditional comments (e.g.