I am dynamically creating a hyperlink in the c# code behind file of ASP.NET. I need to call a JavaScript function on client click. how do i accomplish this?
thanks in advance
If I create a cookie in Javascript document.cookie = 'unseen' how do I delete it when I navigate away from this page? This is the only cookie I am creating on the page.
text = text.replace(/\.(?=[a-zA-Z0-9\[])/g, "<span style='background-color: #FF00FF'>.</span>");
I want to use javascript to highlight all full stops that is followed by letters, numbers and [. The above expression works for letters and numbers, but not bracket. Any idea what's wrong?
In Javascript, how do I get the number of weeks in a month? I can't seem to find code for this anywhere.
I need this to be able to know how many rows I need for a given month.
Thanks for all the help.
I am looking for a way to insert javascript code block to end of ASP.NET page.
Page.ClientScript.RegisterClientScriptBlock(typeof(Page), "videoyuGoster", sScript, true);
is appending to body but js codes are always requesting some js files didn't load or some functions are below of the script.
How can i append scripts that i generated dynamically to the bottom of body?
Thanks for your help.
Hi All.
I can't find great way to debug javascript. I know firebug on firefox, but it's not best way I think. I want to put break point and trace program but I can't with it.
Do you know good tool or how to trace the program.
I recently asked this question but to my suprise, it worked fine for some time and now has stopped again!
I have a javascript in my script and I have added the link in my view as follows:
It has certain functions which I can access once I have the script in my view. But when running I can see that the fucntions are not called instead i`m getting the error message Object expected at line 104. Why am I having this error and how can I solve it?
Is it possible to simulate a click on a webpage using javascript but without defining a specific element, but rather just specifying the document?
I would have liked to do something like this, and if the location happens to have a link, then this will be pressed:
function simulateClick(x, y)
{
var evt = window.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window,
x, y, x, y, 1, false, false, false, false, 0, null);
window.dispatchEvent(evt);
}
as mentioned on this site
Note that while JavaScript files are
not reliably cached by browsers, CSS
files are.
http://www.websiteoptimization.com/speed/tweak/http/
I'd to use DW cs 4 but before to buy I want to test javascript code hints.
However that feature doesn't work at all.
I have an external .js library and then into an html file I load it
but when I type functions or object by name nothing happen.
Any idea?
I have a JS app that an user interacts with. I need to save the appearance of the interface at the current time, crop out the part that I need (or only shot the part that I need by specifying the div), and send it back to the server.
Clearly any external services would not be able to do this, I need a javascript (or flash) script that can save the screen appearance. Is this possible?
Thanks.
Also, as the comment below says, I cannot use Active X.
Hi,
I wonder if it is possible to create combo box as in the picture below. The aim is that the actual text of the combo (select in HTML) would be different that items' texts that are displayed while the combo is opened.
The application is written using Google Web Toolkit so any solution in gwt or HTML/JavaScript would be great.
Thanks for any hints.
Hi,
is there a way to convert a javascript HTML object to a string?
i.e.
var someElement = document.getElementById("id");
var someElementToString = someElement.toString();
thanks a lot in advance
Ok here is my question in javascript you can declare a variable and be undefined you can apply variable == undefined, I know that but how you can compare a value that you dont know yet if it's in the cpu memory. I have a class which is create it when the user click on a button. before this the class is undefined there no exist in any where so how can I compare it?
without using try{}catch(e){} is there a way????
in JavaScript, the typical way to round a number to N decimal places is something like:
function round_number(num, dec) {
return Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec);
}
However this approach will round to a maximum of N decimal places while I want to always round to N decimal places. For example "2.0" would be rounded to "2".
Any ideas?
In Javascript I can write:
function TheFunc(arg) {
...
}
or
TheFunc = function(arg) {
...
}
or
TheFunc : function(arg) {
...
}
What's the real difference and when should I use which?
The following script returns 20 instead of 21!
var d = new Date("2010/03/21");
document.write(d.getDate());
What am I doing wrong? Is this a JavaScript bug?
Hi,
I have a website in php which is using 4 frames(top, left, middle and right). The middle frame
contains the web user control coded in asp.net. Now, in the right frame( which is coded in php ) some javascript contains the id of the items selected in right frame. I need to get those ids to the middle frame on asp.net user control. How can i do this?
Hi,
I have been looking for a Javascript algorithms that gives me the week number of a given Date object within a custom fiscal year. The fiscal year of my company starts on 1 September and ends on 31 August.
Say today happens to be September 1st and I pass in a newly instanced Date object to this function; I would expect it to return 1.
Hopefully someone will be able to help me with it.
thanks,
fbr
I have to do a postback automatically when a user visit a page. How can I run this postback only once?
javascript:__doPostBack('dnn$ctr424$ViewLogin$btChange','')
Hi all,
How does something like this work without Flash?
http://www.dirtyphonebook.com/dashboard/425-205-1921
I right-clicked on it but there's no Flash menu. I love Flash because its stable and works. But is using some sort of Javascript hack for this kind of complex behavior actually a good idea?
I have created a XUL application, it has got a link for navigating to previous page. This is my link <a href="javascript:history.back();">Back</a>, unfortunately it is not working!!!
In firefox is working as expected, when I run it in XUL it is not working.
Any idea, why it is not working.
Thanks,
Rajeesh
Hi
I need some code to zoom an image when i mouse over that image, i want to zoom that image.
Consider i have 10 images in y page, when i put mouse over in first image that image should zoom and when i mov to second second image should zoom like that...
how can i do this, need some javascript or jquery something like that.But not sure.how can i do this...
Please help me