Forum: JavaScript / DHTML / AJAX Sep 25th, 2009 |
| Replies: 12 Views: 895 Something that might interest you is that before you could do XMLHttpRequest, the basis of AJAX, you could create Iframes programmatically with client side scripting.
Back then it was called... |
Forum: JavaScript / DHTML / AJAX Sep 25th, 2009 |
| Replies: 12 Views: 895 The Form has to be submitted by the browser, instead of programmatically via JavaScript, in order to send the file contents.
The Iframe does not belong to the same document. So the browser can... |
Forum: JavaScript / DHTML / AJAX Sep 18th, 2009 |
| Replies: 12 Views: 895 BTW: in the parent, you'll have defined the function: uploadDone()
eg:
function uploadDone(status) {
if (status) alert('upload complete');
else alert('upload error');
} |
Forum: JavaScript / DHTML / AJAX Sep 18th, 2009 |
| Replies: 12 Views: 895 Yes, unfortunatley you can't use XMLHttpRequest to upload a file fro the users computer.
The reason is that JavaScript does not have access to the file contents. It only has access to the file... |
Forum: JavaScript / DHTML / AJAX Mar 25th, 2009 |
| Replies: 6 Views: 1,153 newDiv.innerHTML = '<input type="file" name="' + divIDName + '" size="57"> <a href="#" onclick="removeAdditionalFile(this.parentNode, this.count)">Remove</a>';
this.count would refer to the... |
Forum: JavaScript / DHTML / AJAX Mar 23rd, 2009 |
| Replies: 11 Views: 1,745 There is a good example on the page I linked.
All you need to do is take the response from the HTTP Request (AJAX Call) and use eval to turn that string into an actual JavaScript Object.
... |
Forum: JavaScript / DHTML / AJAX Mar 22nd, 2009 |
| Replies: 11 Views: 1,745 You can execute JS by using eval(). If the JavaScript is specifically JSON, then you can use JSON library.
http://www.json.org/js.html |
Forum: JavaScript / DHTML / AJAX Mar 21st, 2009 |
| Replies: 11 Views: 1,745 Its actually displaying, but breaks the layout. The images come outside of the main box. So I think you may just have a CSS problem.
btw: You sent me the link to index.php which you mention:
... |
Forum: JavaScript / DHTML / AJAX Mar 21st, 2009 |
| Replies: 11 Views: 1,745 Do you get any JS errors?
Firefox has a great extension called Firebug. It has good JS debugging. Safari and Chrome also have similar debuggers/consoles.
Changing the url you have the AJAX... |
Forum: JavaScript / DHTML / AJAX Mar 21st, 2009 |
| Replies: 11 Views: 1,745 A change it the URL path won't affect "AJAX". Only a domain change, such as a subdomain.
So it must be something else in your code. |
Forum: JavaScript / DHTML / AJAX Mar 21st, 2009 |
| Replies: 6 Views: 1,153 If you're trying to remove the last element in the array, use Array.pop() instead.
https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global_Objects/Array
However, your splice looks... |
Forum: JavaScript / DHTML / AJAX Apr 25th, 2008 |
| Replies: 24 Views: 8,228 You can't access the DOM of a window on another domain opened by your domain. This is a restriction that prevents XSS (cross/same domain policy)
If you own the other domain, then you can have PHP... |
Forum: JavaScript / DHTML / AJAX Mar 20th, 2008 |
| Replies: 6 Views: 4,091 |
Forum: JavaScript / DHTML / AJAX Mar 20th, 2008 |
| Replies: 3 Views: 1,363 I don't believe labels can be used for multiple FORM elements.
The idref should be the value of the id attribute of the FORM element for which the label is for. The [CS] stands for Case... |
Forum: JavaScript / DHTML / AJAX Jan 25th, 2008 |
| Replies: 24 Views: 9,294 Was aiming that at OP and the DOM universe in general.. :) |
Forum: JavaScript / DHTML / AJAX Jan 25th, 2008 |
| Replies: 24 Views: 9,294 I'd suggest making sure you don't have any whitespace in your XML. That way, you don't need to have to cater for text nodes where you don't want them.
It may also be better to traverse the XML... |
Forum: JavaScript / DHTML / AJAX Jan 25th, 2008 |
| Replies: 9 Views: 4,441 See: http://www.quirksmode.org/dom/range_intro.html |
Forum: JavaScript / DHTML / AJAX Jan 25th, 2008 |
| Replies: 24 Views: 9,294 Yes, the exception occurs at
master.value=xmlObj.childNodes[0].firstChild.nodeValue;
it seems.
In your catch block place an
alert(e); |
Forum: JavaScript / DHTML / AJAX Jan 24th, 2008 |
| Replies: 9 Views: 4,441 Do you want to get the Text that the user has currently selected? |
Forum: JavaScript / DHTML / AJAX Jan 24th, 2008 |
| Replies: 24 Views: 9,294 I misspelled responseXML. It should be
var xmlObj = xmlHttp.responseXML.documentElement; |
Forum: JavaScript / DHTML / AJAX Jan 24th, 2008 |
| Replies: 24 Views: 9,294 Try removing the different DOM parsing functions and just have XMLHttpRequest return XML.
function ajax()
{
var name=document.getElementById('name').value;
getXmlHttp();
var... |
Forum: JavaScript / DHTML / AJAX Jan 24th, 2008 |
| Replies: 9 Views: 4,441 You'll need to find out how to render HTML attributes using struts.
-----
Re: getElementById
Once the HTML is rendered on the page, the browser will create a DOM (Document Object Model)... |
Forum: JavaScript / DHTML / AJAX Jan 23rd, 2008 |
| Replies: 9 Views: 4,441 btw: once you have the value of the string, you need to do some matching with regex or similar to get what you want out of the string. |
Forum: JavaScript / DHTML / AJAX Jan 23rd, 2008 |
| Replies: 9 Views: 4,441 What markup language are you using?
In HTML a text area is just <textarea>.
You'll need a reference to the DOM node representing the text area, example:
textarea HTML
<textarea... |
Forum: JavaScript / DHTML / AJAX Jan 23rd, 2008 |
| Replies: 24 Views: 9,294 Do you have firebug installed on Firefox?
Try viewing your XMLHttpRequest in Firebug and seeing if the response is well formatted.
What version of FF is it btw?
You can also tell if its... |
Forum: JavaScript / DHTML / AJAX Jan 17th, 2008 |
| Replies: 24 Views: 9,294 You can also replace:
var x= new DOMParser().parseFromString(textout, 'text/xml');
xmldom.async="false";
xmldom.loadXML(x);
alert(xmldom);
xmlObj=xmldom.documentElement;
with: |
Forum: JavaScript / DHTML / AJAX Jan 17th, 2008 |
| Replies: 24 Views: 9,294 Good Call.
You should use
var textout = xmlHttp.responseXML;
instead of
var textout = xmlHttp.responseText; |
Forum: JavaScript / DHTML / AJAX Jan 9th, 2008 |
| Replies: 24 Views: 9,294 Can't see why your codes doesn't invoke xmlHttp=new XMLHttpRequest(); bit odd.
var xmlHttp;
function getXmlHttp()
{
try {
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e) |
Forum: JavaScript / DHTML / AJAX Jan 7th, 2008 |
| Replies: 4 Views: 1,303 Yes, you can use JS server side. However, you'll probably be surprised that it may not handle like the client side JS since you are working with a different environment and model. Instead of an Event... |
Forum: JavaScript / DHTML / AJAX Oct 30th, 2006 |
| Replies: 19 Views: 19,696 Not really sure what you want...
But wouldn't <a href="#" target="_blank"><input type="button" /></a> work for you?
(You may have to define height and width for IE though).
If you're going to... |
Forum: JavaScript / DHTML / AJAX Oct 28th, 2006 |
| Replies: 19 Views: 19,696 Btw: adding a href attribute to a div will make it invalid xHTML1.0. So even if you found a way to do it with CSS, you'd run into that problem. The solution would be to create a custom DTD for your... |
Forum: JavaScript / DHTML / AJAX Oct 28th, 2006 |
| Replies: 19 Views: 19,696 Nope, unfortunately you're right. You can't emulate links on any other HTML element with CSS. You'll have to use JS for that.
If its an issue of support for javascript than I don't think there's... |