I'm writing a web page in ASP.NET. I have some Javascript, and I have a submit button with an onClick event.
Is it possible to call a method I created in ASP with Javascript's onClick event?
Hello,
I am using the ExternalInterface to communicate between Flash and JavaScript using callbacks and the call method. I would like to throw an exception in ActionScript 3.0 and catch it in JavaScript and I was please wondering if there was anyway to do that?
Thank you very much,
Rudy
Hi, I am wondering if there is a Javascript equivalent of php's parse_url. Currently, I wrote my a simple parser with regex; however, I would think that such function already exists in the in Javascript.
Hi,
I would like to open a webpage and run a javascript function from within a java app.
For example I would like to open the page www.mytestpage.com and run the following javascript code:document.getElementById("txtEmail").value="[email protected]";submit();void(0);
This works in a browser...how can I do it programatically?
Thanks!
I was wondering if there was a way of adding javascript in every occurrence of a certain HTML tag, eg.
<td onmousedown="">
At the moment I just have it in every single one of my td tags in my table, but there must be a cleaner way. Something like adding javascript in the way CSS adds formatting.
Hello, I am posting this question for the third time because never got correct answer. I want to open 2 windows on 1 click. Don't tell me to use window.open twice because I want to open one javascript banner i.e.
''
and one website that can be any like google or yahoo and it can easily open with window.open but how can I open the banner which is in the javascript code with second site?
I have quite a number of user controls that I need to embed in Umbraco macros. Each user control has quite a bit of in page javascript that needs loaded into the page.
I have been building up the javascript with StringBuilder.Appendline then registering a startup script with code behind but this stinks and I feel there has to be a better way of going about this.
Has anyone any ideas please?
Thanks,
B
From my previous question(Create json using JavaScriptSerializer), In .ashx file I am printing the json object using:
context.Response.ContentType = "application/json";
context.Response.Write(json);
I am calling this .ashx file from default.aspx which has some javascript function inside its <head> tag.
My question is :
How will I be able to call the javascript function from .ashx file after context.Response.Write(json);?
I have a string generated by php's json_encode() that looks like this:
[ { "key1":"value1",
"key2":"value2",
"key3":"value3"
},
{ "key1":"value1",
"key2":"value2",
"key3":"value3"
} ]
I use Javascript function to convert the string to Javascript object:
var jsonObj=JSON.parse(string);
How do I access the data inside since the inner objects have no names? I tried something like:
alert(jsonObj.firstChild.key1);
It gives me "undefined". Why is that so?
I want to parse a html-page that unfortunately requires JavaScript to show any content. In order to do so I use a small python-script that pulls the html-code of the page, but after that I have to execute the JavaScript in a DOM-context which seems pretty hard.
To make it even harder I want to use it in a server environment that has no X11-server.
Note: I already read about http://code.google.com/p/pywebkitgtk/ but it seems to need a X-server.
Is there a way to get a variable name as a string in Javascript? (like NSStringFromSelector in Cocoa)
I would like to do like this:
var myFirstName = 'John';
alert(variablesName(myFirstName) + ":" + myFirstName);
--> myFirstName:John
-- added
I'm trying to connect a browser and another program using JavaScript. I would like to send instance names from a browser to another program for callback method.
I have a JavaScript function that loads a flash movie into a webpage div using swfobject.embedSWF().
I want to be able to, alternatively, load a .mov file into the same div, in the event that this is the file found instead of the .swf.
Is there a close equivalent to swfobject.embedSWF for the purposes of embedding a .mov file? If not, what is an efficient route to doing this using JavaScript?
I want to use Google Chart API using javascript. (I don't want to use the python wrapper)
So how do I send data from my python code into the javascript to create graphs?
I am creating one admin page where I have multiple textboxes.when I enter the userid in one textbox I want to display user name in next textbox when admin moves to next text box.for this I can use ajax or javascript? which one will be better?how can I do it through javascript.
Hi,
How can I evaluate's document.write javascript to plaintext in C#? I'm trying to evaluate this:
<script type="text/javascript">
a=2;b=3;
document.write(a+"_"+y);
</script>
to this:
2_3
I am using below code for javascript window "Yes/No". It is firing twice. Is there any way I can avoid this? Or use any other code?. I need this code behind.
Response.Write("<script language='javascript'> { self.close() }</script>");
I was hoping to make a website that displays a google map with points based of information returned by a C++ function. I know you can use Java Server Pages to call java methods on the server with javascript. Would there be a way to connect C++ code on the server with javascript in order to produce the same result as java server pages?
Hi I'm passing a unixtimestamp to a javascript IF statement, can anyone tell me how to generate a unixtimestamp one minute in the future with javascript.
Anyhelp would be helpful.
Thanks
I have a text box called txtName on my form.
In my page I know I need to place the code in my HEAD tag like so......
<script type='text/javascript' language="javascript">
document.forms['FormName'].elements['txtName'].value = "Robert"
</script>
But I cant seem to set a value inside my text box.
Hi
I am am running some selenium tests(ruby) on my web page and as i enter an invalid characters in to a text box i have the JavaScript throw a alert like so
if(isNaN($(this).val()) || Number($(this).val().valueOf() <=0)){
alert("Please Enter A Number");
}
how can i handle this alert when its made and close the pop up?
i tried to use the wait_for_pop_up() and close() but i think that's only for browser pop up's and not JavaScript alerts.
any ideas?
thanks
Hi all,i want to enable facebox jquery using javascript.
here in normal html
<a href="stairs.jpg" rel="facebox">text</a>
how do in javascript ?something like this?
document.location.href="stairs.jpg";
document.location.rel="facebox";
I'm trying to write a code that can run on Android 1.5 and 2.0.1, but I have issues with the javascript engine used on Android 1.5.
alert(localStorage); just hang on v1.5 while on v2.0.1 it alerts correctly.
is there an unblocking way to do it or to detect the version of Android with javascript?
I have a JavaScript variable which holds an HTML page and due to the setup I need to extract everything between <div id="LiveArea"> and </div> from that variable using JavaScript.
Any help is greatly appreciated.
I am newbie.
many of javascript code start with <!--
<script type="text/javascript">
<!--
and finish with //-->
//-->
</script>
I think the reason is for compatibility.
But I cannot find the clue in any books.
even I cannot find anything with google.
Is there a way to generate an .xslx file from javascript and allow the user to download it by javascript? This page is geared towards being run offline in html 5 with no internet connectivity.