$('').click(function(event) { ChangeXYZ(event); });
Problem with above is i do not want event but i someother var.
$('<a/>').click(function() { ChangeXYZ(var123); });
But problem with line is, it is getting value of var123 at runtime and as i am adding this in loop so always end up using last value of var123. Looks like it is using ...
I have a simple ASP.NET page with a paging support.
Basically just a hyperlinks which looks like a
report.aspx&page=1
report.aspx&page=2
etc
How could I implemente a keyboard shortcuts so I could go forward
to next page and to previos page by just holding CTRL and pressing
either left arrow or right arrow.
I have seen a same functio...
Is there a version of the standard DreamWeaver MM_validateForm JavaScript function that takes into consideration pre-populated titles-as-values of form fields? Such as
<input type="text" name="fname" value="Enter your first name" />
which is displayed in a lighter grey color or something. Since this value is already filled, the valida...
Hi guys,
I have 2 CSS files for my site, one for all normal browsers and other for the retarded Internet Explorer. I am including either of the CSS file depending on a JavaScript which checks the browser capabilities. What would be the best option in case the user has disabled JavaScript!
I should be including some CSS without which all ...
As the title goes,I want to know the exact reason why javascript is called a "scripting language"?
As per my knowledge its called so because javascript is only interpreted by the browser (and not compiled). Correct me if I am wrong.
Also if there is no compilation then how come 0 == '' is true? Doesn't the compiler coerce the values (i...
Anyone know how to format the columns on a flexigrid?
http://turbogears.org/2.0/docs/main/ToscaWidgets/Cookbook/FlexiGrid.html
the colModel doesn't seen to have any formatting params
I want to do simple things like format my date col with "{0:dd MMM yyyy}"
...
HI, Is there a way by which I can rotate an image inside a div clockwise or anticlockwise.
I have a main fixed width div[overflow set to hidden] with images loaded from database. There is a scroll bar for showing the images inside the div. When image is clicked then I need to show the rotating animation either in clockwise or anticlockw...
Hi
I just got hung up on this:
if ( !(cmd === 'JustifyLeft' || cmd === 'JustifyRight' || cmd === 'JustifyCenter' || cmd === 'JustifyFull') )
(JavaScript)
Any suggestions to do it better?
thanks
...
I was trying to make a kind of background in which some clouds were moving, but after I got the clouds moving I found that I should either make them stop and return when reaching the browser's max width, or make them disappear. I was trying to get their position but I can't manage to get all the positions dynamically. Right now (for the ...
I have some JavaScript that creates Forward and Back buttons. However, I need to pass a parameter in the URL (?id=$idd):
<a href="javascript:submitForm('mainForm','back');" title="Go back to the kit home page" style="float: left;"><img src="images/back.gif" alt="Go back to the kit home page" border="0" /></a>
<a href="javascript:submitF...
Hi
I have
<a href="test.php?id=2" class="confirm_delete">Click to proceed</a>
and following javascript. When I click on above link it displays the dialog box with 2 buttons. "return false;" stops the default event of link tag. But I need the functionality in which when I click "Yes, delete" to take me to other page by choosing href ...
Hello,
I am curious to know how to implement inline expansion.
I am writing my own compiler just for fun and education.
I learn a lot by example so if someone can provide me an algorithm that does inlining that can help.
I prefer in C++ but the language doesn't matter.
The target language that I'm trying to write inlining for is javascri...
I want to detect the height of the viewable area using Javascript. I have this DIV of height 550px which I want to display on the browser. However, this height might cause the vertical scrollbar to appear on some browsers (depending on how many toolbars the user has installed). In that case I want to detect that, and alert the user about...
I have a simple web page with a simple puzzle. There are some images that user is supposed to drag to their designated drop zones. I use solution in JavaScript generated by DreamWeaver.
I want to add a JavaScript function that will show a correct.png or wrong.png image next to the image a user just dropped. The straightforward way to do...
I'm tearing my hair out on this one; I want / need / would like something akin to one of the many tree viewers out there, but where I can also edit the structure, the name and the type of nodes (the world doesn't just have folders and files, people). I've Googled myself silly over this, looked at which plugin I could modify to do my bidd...
problem i have is that, the validation summary message(alert) is displayed twice. I cannot figure out the reason.
Please help.
Here is the code
function validate() //javascript function
{
if (typeof(Page_ClientValidate) == 'function')
{
var isPageValid = Page_ClientValidate();
if(isPageValid)
{
...
Hi,
When a javascript error occures in IE (or in other browsers) you get a popup saying that javascript error has occurred - usually this comes with a line number and some hint.
Sometimes it comes with line 0 and with no way of knowing what the problem is.
Javscript can come from HTML itself, from a js file or from JSP (and more).
Micr...
I am using Thread.sleep(5000) and then using Page.ClientScript.RegisterClientScriptBlock(type, key, script) function to open a new window.
I am getting 5 new windows but not in each 5 sec, they all appear together, after 25 sec. Here is my sample code:
for(int i=0;i<5;i++)
{
System.Threading.Thread.Sleep(5000);
string openPage =...
I'm have a web page where I have a div within which there is a somewhat complex DOM tree. It displays fine across most browsers(IE 6-8, FF 2.x-3.5.x, Chrome, Safari) but when I try to print the page I'm having some cross-browser problems, some work half some of the time and others don't work at all.
I had the idea that if I could send o...
How do i convert 5 click functions into one? eg
$("div#styleswitcher a.green").click(function(){
$("container").css({'background' : 'green'});
)
$("div#styleswitcher a.blue").click(function(){
$("container").css({'background' : 'blue'});
)
$("div#styleswitcher a.red").click(function(){
$("container").css({'background' : 'red'});
)
...