How can I replace this character | in JavaScript?
<html>
<body>
<script type="text/javascript">
var str="data|data|data";
document.write(str.replace(/|/g,"<br />"));
</script>
In the output of given code, every character has the "< br />"
I don't know what is wrong with my code.. :)
Also, for PHP, I want the function to us...
Hello,
can anyone guide me how to upload a file thorugh ajax
when users click on Upload, i'm opening a div and users click on submit button, i'm calling an ajaxfile
upload :
1) How can i get these values in javascript ?
$name = $_FILES['profile']['name'];
$temp = $_FILES['profile']['tmpname'];
so that i can pass to the ajaxfile...
I am trying to fade out and fade in the text inside a textbox.
Is this even possible with jQuery or javascript?
Thank you.
...
Hi,
I have the following date format: 2010-04-15 23:59:59
How would I go about converting this into: 15th Apr 2010
using javascript
...
Hello,
i've got a little problem with AJAX, CouchDB and JavaScript.
I can open the following URL from CouchDB in my browser: http://192.168.1.58:5984/mydb/name
new Ajax.Request('http://192.168.1.58:5984/mydb/namee', {
method: 'POST',
onComplete: function(transport) {
alert(transport.responseText);
}
});
I always get empty ...
I have a map object lile
var map = new google.maps.Map(document.getElementById("map_canvas"),myOptions);
and I want to get the the reference of overlayImage Pane.
How it is possible?
...
I have two questions about google maps local search.
Here is my code:
var options = {
onSearchCompleteCallback:function(searcher) {
// content of onSearchCompleteCallback function
// creates markers and applies addresses to a result list
// at this point code isn't necessary, because this function already wor...
Hi,
I am trying to debug some javascript in visual studio 2005 but when VS opens i just get the error:
Unable to attach to the crashing
process. The process has been
terminated.
Anyone have any ideas why this may be...?
I am using VS 2005, IE8 and Vista.
Thanks
Paul
...
I have a form that pop up inside a layer, and I need to make everything inside that form read only regarding what type of input it is. Anyway to do so?
...
The following code will not do what I hoped, that is run the Ajax function when the div ="dist" li
created by the PHP code's is clicked.
Guidance please.
<?php
// ...
$result = mysql_query($sql);
echo "<div class=\"dist\">";
echo "<ul>";
while ($row = mysql_fetch_array($result)) {
echo "<li><a href=\"devplan....
hi all,
I want to make a call to a function of vb.net class from javascript. I mean I would call something which doesnot have extention as .aspx but rather .vb only. Is is possible? how?
Thanks and regards,
Tanmay.
...
I was looking for a trim function in JavaScript which doesn't exist and some code on Goggling suggests that use:
function trimStr(str) {
return str.replace(/^\s+|\s+$/g, '');
}
I want to know how str.replace(/^\s+|\s+$/g, '')
works. I understand that this is some form of regular expression but dont know what it is doing.
...
I have two functions
function1()
{
//...
}
in function1 i make ajax requests and load an image
there is another function - function2 where i call function1 to load an image.
now, what is the question.
How can i stop propagation of function1 before i will call it again in function2?
function2()
{
// ...
//...
Hello,
Is it possible to read the currently viewed/visible text in the viewport(in a scrollable body) of an html document?
Thanks,
Prasad Kancharla
...
Hi all,
I am using the classic form demo. The link is: link text
If you try out the demo & try to upload a file, you can see once you click on the "Submit Application" button, the cancel (cross image) button does not show up in the top right hand corner of the blue box (that indicates the progress). How can I manipulate the existing co...
Am not new to JS or its syntax, but sometimes, the semantics of the language has me stumped at times. At work today, a colleague mentioned this:
var a = b = [];
is not the same as
var a = [], b = [];
or
var a = []; var b = [];
since the first version actually assigns the reference to an empty array to a and b. I couldn't quite a...
Hi guys.
Lets say i have a ajax method which call a script that checks if a user exists in the database.
What is best to be returned from the server side code?. Should I Just make an echo "notfound" and then compare the response in the javascript, return a json object or any other suggestion?
...
googled but cant be found ...
...
When removing an element with standard JavaScript, you must go to it's parent first:
element = document.getElementById("element-id");
element.parentNode.removeChild(element);
Having to go to the parent node first seems a bit odd to me, is there a reason JavaScript works like this?
...
Hey, I am a newbie to JavaScript. I really don't know what it does. Can someone please tell me what can I do with it. I mean what are the possibilities of JavaScript. Also what tools will I require to develop in JavaScript. Is there some plugin available in Eclipse? Thanks.
...