javascript

I want to run remote javascript on my server.

Hi, I've had a search and come up with Rhino and Jaxer is possible solutions, but wanted to put the queston out there anyway as I'm not sure they're quite what I'm after (especially if I have no control over the javascript, so I'm unable to add runat="server" for example). So, I want to call a remote page on a 3rd party site, from my s...

Calling Applets methods using Java Script hangs browser when JRE is disabled

Hi All , The applet methods work fine when JRE is enabled document.appletName.methodName() ; // Using Java Script . But when JRE is disabled using the Java Control Panel . on call of " document.appletName.methodName() " method , the browser starts to hang . How can we make the browser not to hang !! I am using Object Tag . Any...

What is the difference between these codes?

<input type='text' id='txt' name='txtName' size='20' value='testing'/> <script type="text/javascript" language='javascript'> var val = document.getElementsByName('txtName'); alert(val[0].value); alert(window.txtName.value); </script> In above code we are using alert(val[0].value); alert(window.txtName.value); these two ways ...

How to use this easeOutBounce method?

here is the method for easeOutBounce easeOutBounce: function (t, b, c, d) { if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b; } else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; } else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; } else { return...

Span element change event

Hi! My question is: Does have a span element the inner html change event? I think about I have a span and when the span inner html is changing it will throw an event that I can reach? I would like to use Jquery to bind to this event of span. l. ...

reload list in dashcode 3.0

hi. i am developing web app in iphone using dashcode 3.0 and i am completely new for it. I have one problem. I have created one search button for searching particular city which inserted in search Field. List items which having cities bounded using binding datasource which is running successfully but when i want to search particular city...

selecting text by ignoring inner Elements of div tag javascript

<html> <body> <script language="javascript"> function getSelectionHTML() { var div = document.getElementById("myDiv"); if (document.createRange) { var textNode=div.firstChild; var rangeObj=document.createRange(); rangeObj.setStart(textNode,0); rangeObj.setEnd(textNode,5); div .innerHTML =...

Why does this code give an error?

$("#main").animate({ display: "block", width: "70%", opacity: 0.4, marginLeft: "0.6in", fontSize: "3em", borderWidth: "10px" } 1500); This is jQuery. I get a "missing ) after arguement list" message. What's wrong? ...

asp.net mvc json 2 times post to the controller

function onTestComplete(content) { var url = '<%= Url.Action("JsonTest","Organization") %>'; $.post(url, null, function(data) { alert(data["name"]); alert(data["ee"]); }); } <% using (Ajax.BeginForm("JsonTest", new AjaxOptions() { HttpMethod = "POST", OnComplete = "onTestComplete"...

Regex in JavaScript

Suppose we don't know how many slashes we could get in a string but we do not want any extra slashes. So if we get this string '/hello/world///////how/are/you//////////////' we should transform it to the form of '/hello/world/how/are/you/'. How to do it with the help of regular expressions in JavaScript? ...

Why is this UL and inline JS giving errors during HTML validation?

I've just run the homepage of a site I'm working on through the w3c HTML validator and it's come back with 3 errors and 2 warnings. I've taken a look at them but can't see why they would be causing a problem. I've pasted them in below (I've removed URL's/strings etc as the site isn't quite ready to be made public yet). This is being v...

JavaScript source file not loading in IE8 Popup

I have an issue where the JavaScript source file is loading in popup for IE6, Chrome, Firefox, Safari and Opera. But the same source file is not loading up in IE8. As a result of this the HTML is not being replaced in the Popup and I am getting an error in IE8 popup saying tinyMCE is not defined I have referred to http://stackoverflow....

0.699 x 100 = 69.89999999999999 ?

Possible Duplicates: Why does 99.99 / 100 = 0.9998999999999999 Dealing with accuracy problems in floating-point numbers I've seen this issue in php and javascript. I have this number: float 0.699 if I do this: 0.699 x 100 = 69.89999999999999 why? edit round(0.699 x 10, 2): float 69.90000000000001 ...

How to make JS execute in HTML response received using Ajax ?

I have following workflow div on the page is used on users operation request is done to server side page whose html is retrived using ajax and dumped into the div With html markup some JavaScript is also dumped however that is not getting executed. Why is so ? What could be the possible fix ? Though i avoid doing things like this bu...

javascript not loading after output of PHP file_get_contents() string

I have the following structure: -uploadpage.html -index.php -resources -jquery-1.4.2.min.js On my index.php, I get the contents then output uploadpage.html through this code: $output = file_get_contents("uploadpage.html"); echo $output; My upload.html has the javascript at the bottom: <script type="text/javscript" src="./res...

jQuery: Getting value from input array

We have the following form: <form> ... <table width="100%" cellspacing="0" class="datagrid_ppal"> <tbody> <tr> <th scope="row">Area 1 <input name="config_line" type="hidden" value="0,5,50" /></th> <td class="gantt"> </td> <td class="gantt"> </td> <td class="gantt"> ...

css to replace characters in paragraph tag

Already checked exisitng questions for this, but didn't find an exact match. My aim is to replace characters (like spaces) on a webpage with a small image using css. Example: <p><span>This is a text</span></p> becomes: <p><span>ThisIMGisIMGaIMGtext</span></p> (where IMG stands for a visible image (middot-pic for a space f.e.)) I...

Multiplying values using javascript

i have used js to multiply but only 1st row is getting multiplied other rows are nt getting multiplied. <?php $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("form1", $con); error_reporting(E_ALL ^ E_NOTICE); $nam=$_REQUEST['select1']; $row=mysql_query(...

Running bookmarklet from a keyboard shortcut in Opera

The Opera web browser makes it very easy for users to tie keyboard shortcuts to bookmarks by editing the keyboard.ini file, e.g. F1 = http://google.com/ will allow a single keystroke (F1) to Google. I'd like to similarly tie a keyboard shortcut to a bookmarklet --- but the following doesn't work: F1 = javascript:alert('Hello, World...

Is event.preventDefault cancelling change events?

Hello! I have a certain situation I want to clarify for myself, and I would be glad if anyone has any experience with this issue and is willing to explain it to me. I have a textarea that has a change event handler: textarea.bind('change', function(event){ // do something }); Hypothetically, what if I have some sort of a click ev...