Hi
Which is best book to learn HTML, CSS, Javascript, ASP.NET 3.5 & Ajax? I would like to have a single book covering all the above topics.
Thanks
Satyaprakash
Guys I have a couple of questions:
Is there a preformance difference in Javascript between a switch statement and an if...else if....else?
If so why?
Is the behavior of switch and if...else if...else different across browsers? (FireFox, IE, Chrome, Opera, Safari)
Is there any "python's Generator" equivalent in JavaScript?
PS:
Python's Generator is very memory efficient when we need to do one time iterate through a big array, hash...
"Generators are iterables, but you can only read them once. It's because they do not store all the values in memory, they generate the values on the fly"
(Python's Generator explained in this thread: The Python yield keyword explained )
Is there a way to use javascript to determine how long someone was looking at my webpage before they closed their browser or hit the back button? Something like send a message to php page every few seconds or so in the background?
if anyone fancies doing me a really quick favour, it would be really appreciated:
static function make_url_safe($z){
$z = strtolower($z);
$z = preg_replace('/[^a-zA-Z0-9\s] /i', '', $z);
$z = str_ireplace(' ', '-', $z);
return $z;
}
what js functions should i be looking at to convert this function to javascript?
I've seen this all over the web
javascript:__doPostBack('ctl00$ContentPlaceHolder1$lnk2','')
Checking headers of the last place I saw it didn't reveal a server side language.
What server side language and/or framework encourages this style of link?
There is something in my mind:
In a web page,there are lots of things we can see from our browser.One of them is text.
Now i have some patterns,"abc","hello",or some other strings.In the text, i want to find all the patterns and change the color or background-color of them.
Like this:
text: what a wonderful day! pattern: "a","day"
resulet: what a wonderful day!
How can solve this whit Javascript?
What would be the preferred way to convert opacity (0 - 1) to hex (00 - ff) in Javascript?
My thoughts are to use an if statement to check if opacity is between 1 and 0.95 then use ff. Work my way down to 0.
Hi all
I wanted to ask if there is a formal way of describing the following code, whereby we can access the same object repeatedly without re-typing the object's identifier:
myObj.render(1).render(2).print();
I didn't know how to describe it when trying to form a question; I wanted to know whether or not something like this is possible in javascript, I know that I can do it in VB:
myObj.render(1)
if(foo == 'bar')
.render(2)
.print();
Thanks!
The question says it all really, I'm looking for book recommendations, video tutorials etc. I've been programming since I was about six so I don't need a book that spends 4 pages on for loops (thought that might be a Bad example in terms of javascript).
Also I'm learning ASP.net at the moment so anything on interoperability features/issues would be welcome, though I'm guessing I just showed my ignorance with that question.
Can someone help me fill in the blanks with native JavaScript?
function getHeading(lat1, lon1, lat2, lon2) {
// Do cool things with math here
return heading; // Should be a number between 0 and 360
}
I've been messing around with this for a long time and can't seem to get my code to work right.
Hello, could some one recommend a way to get page name from a url using JavaScript?
For instance if I have http://www.cnn.com/news/1234/news.html?a=1&b=2&c=3
I just need to get "news.html" string
Thanks!
Hi,
In javascript, how can I test 2 "sets" of conditions in one if statement? example:
if ((a == 'someValue' && b == 'someValue') || (c == 'someValue' && d == 'someValue')) {
// do something
}
Thanks!
Is there a built in equivalent to the .NET framework's DateAdd or AddMonths functions?
I'm looking for the easiest, cleanest way to add X month to a Javascript date.
I'd rather not handle the rolloing over of the year as done here.
or have to write my own function as done here.
Is there something built in that is as nice as the .NET Date.AddMonths function? Or something close?
Hi,
I want to disable writing in an input type text using javascript
the input type text is populated from database that is why i don't want that user modify its value.
Thinks for help
is there a way to load the full binary of an image in javascript?
what i want to do is to allow the user to preview an image before uploading it.
ie the user selects an image on his local drive (C:\image.jpg) , view it, and decides to upload or cancel.
i tried to set the source to the image path, but it didn't work since it is outside the webapplication project folder.
any help?
I want to display a certain message on a certain page.
Suppose the name of the page I want to display something on is called "foo_page.html",
How can I do this using javascript?
How to convert such an array from PHP to JavaScript?:
$arr = array('oneKey' => array('key1' => 'value1',
'key2' => 'value2'),
'anotherKey => array('key1 => 'value1',
'key2 => 'value2'));
I have a text:
<font class="myclass">class abc</font>
and i have a pattern: class
now, i want to find the word "class" before "abc" but not in the <font class="myclass"> ,how could i do with RegExp in javascript?
Thanks! :)
instead of using getParameterByName('Field', PostData) (PostData == $('form').serialize();)
I would like to write PostData.Field, how can i do that with javascript?