search for: innerhtml

Displaying 20 results from an estimated 221 matches for "innerhtml".

2006 Feb 12
0
Effect.Highlight doesn''t return to original color with many elements?
...the issue but doesn''t perform as desired...I really need this to appear almost instantaneously. It appears this happens in both IE and Firefox. Thanks for any help you might provide! John <script language="javascript"> $(''ActualSchedule_EndDate_1'').innerHTML = ''02/16/2006''; new Effect.Highlight($(''ActualSchedule_EndDate_1''));$(''ActualSchedule_DurationDays_1'').innerHTML = ''9'';...
2006 Jun 27
14
iframe ... does it have an innerHTML ?
If I dynamically create a hidden iframe, how could I add a document in a string to that element? e.g., var sDocument = ''<html><head></head><body>Hello world.</body></html>''; I''ve tried several variations of appendChild, innerHTML, document.innerHTML, createTextNode. Argh! _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
2006 Jun 27
5
Ajax - Inserting selected elements from request.responseText
...{ // request.responseText holds the entire page Only the content contained in elementID = ''source'' is intended for display At this time, the following code works, but it disturbingly copies the entire page from the source URL into the target DIV $(''target'').innerHTML = request.responseText; // copy the entire page $(''target'').innerHTML = $(''source'').innerHTML; // remove everything bur the content of element ''source'' Any suggestion for a method to copy only the innerHTML of ''source'' ?...
2007 Apr 13
2
inplace editor and textarea
Hi, I have an inplace editor and I can access the innerHTML value of the created form. However the innerHTML gives "<textarea>....</textarea> ..." How can I access the textarea value? I tried to do innerHTML.textarea.value but it didn''t work. Any ideas will be appreciated. Thanks, Joe -- Posted via http://www.ruby-forum.co...
2006 Apr 12
11
innerHTML and scripts not running
...var sts = xmlHttp.transport.status ? xmlHttp. transport.status : "undefined"; $("debug_msg").value= "XMlHttpRequest returned response status "+sts; document.getElementById("debug_msg").innerHTML= "HTTP response and server information; "+ "response status="+ xmlHttp.transport.status; } else { document.getElementById("display_area").innerHTML =xmlHttp.transport.responseText; document....
2006 Apr 29
4
Event.observe mystery
Hi, I have a class ''Menu'' with a method ''addItem''. The method (simplified) looks like this: addItem: function(itemId, text) { this.container.innerHTML += ''<div id="''+itemId+''">''+text+''</div>''; Event.observe(itemId, ''mouseover'', this.onMouseOverHandler.bindAsEventListener(this), false); } I call my class in the following way: var myMenu = new Menu(...
2007 Jun 07
4
Effect.Fade and innerHTML?
Hi there, I''m now having an odd problem with Effect.Fade not working based on the innerHTML of a div. Take the following for example... <div id="blah"> Nothing here yet. </div> If I then update "blah", hide it and then fade it in, like so: <script type="text/javascript"> document.getElementById("blah").innerHTML = ''&lt...
2005 Sep 27
8
prototype.js
...atibility bug with the IE. We wrote a component so it updates itself periodically using AJAX. we used the prototype.js to accomplish this (using the periodicalUpdater object). now the component works fine using firefox or opera, but NOT with IE. the problem is the following line of code: receiver.innerHTML = response; where receiver is of type: ''HTMLTableSectionElement'' (inheriting the innerHTML attribute from HTMLElement, which is a plain string) and response is of type string. the funny thing is: IE can read this attribute, but it cannot set it!!!! We were wondering if you ever...
2006 Jan 30
5
RE: sortable list question
Assuming that $(ids[i]) is the hidden input field, wouldn''t the following line need to reference it as a form element? > $(ids[i]).innerHTML = i; I would assume it should be (the "'''' + " makes it a string, not sure if you can set a form element value to an int, maybe you can): $(ids[i]).value = '''' + i; Or maybe I''m not understanding the code. Greg
2007 Nov 30
2
make sortable divs and innerHTML
My problem is that elements that were included in my site with innerHTML can´t be sortable because the DOM doesn´t know that these elements are there. Has anybody a solution or an idea to this problem? ToM --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" g...
2006 May 24
5
best way to return JSON?
I''m using Ajax.Updater to update a select element, and have just discovered that IE doesn''t like having its innerHTML set. I figure instead of a bunch of option tags I can return JSON and parse it to add the options, but I''m not quite sure of the best way to do this.... or any way to do it really :) Could someone point this out to me? Or am I using a totally antiquated technique and should just use RJS?...
2008 May 21
6
this.initialize has no properties error in Prototype Code
...d; var params = ''video_id='' + video_id; Ajax.Response(''trackVideo.php'', { method: ''post'', parameters: params, onSuccess: function(transport) { var count = transport.responseText; $(''span'').innerHTML = count; Mediabox.open(video_url, '''', ''mediabox[480 380]''); }, onFailure: function() { alert(''I Fudged Things.''); } } ); However, when I try to execute the code I get this error "this.initialize has...
2010 Mar 16
4
Get content from HTML element in Rails
Hey, I''m looking for a way to get the content of my div in my Rails view. I would like the literal HTML content, so only HTML and no Rails I thought inner_html would work, but I get a RJS exception (TypeError: $("content").innerHtml is not a function) Does anyone know how I can get the content? Thanks! In my controller I use this code: [code] def save_test render :update do |page| page[''content''].innerHTML end end [/code] Some more context maybe? I get a HTML form (without the form tags the...
2008 May 05
1
get element by property
I''m fairly new to Prototype and I was wondering if anyone can help me out here. i need to search the document for elements with a specific innerHTML. I have the innerHTML string already, but i dont know how to find the elements with that property. thanks, andrew --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to th...
2011 Apr 18
0
Drying my code ..
I am parsing an xml result using Hpricot, amazing .. I have a serie of tags to be transformed as parameters, so I am building Hash by looping on these tags , the resulting data is oK? but I ma not sure that I wrote a dry code ....... if doc.search(''response > error'').innerHTML.empty? accountTypes = [] (doc/:accounttype).each do |accountType| data = {} .... data[:locale] = (accountType/:localized/:locale/:code).innerHTML data[:title] = (accountType/:localized/:locale/:title).innerHTML .... ... # here is the loop over...
2006 Aug 09
0
Scriptaculous blind up effect not working from innerhtml in IE? Help please.
I have some tables wrapped in divs, when you click them, they are hidden and then some of the data is added as a div into another div by way of innerhtml. When you you click on these new divs that are in the html, they should go away. This works fine in Firefox but doesn''t work at all in IE. Does anyone have any ideas? The weird thing is if I take the source of the html after the innerhtml is generated and save it as a file, the remover...
2005 Dec 28
1
Problem with IE
...nt.firstChild); var width = dimensions.width + 30 + ''px''; var height = dimensions.height; nodoNuevo = Builder.node($(element).firstChild.nodeName, {id:id_elemento}); if($(element).firstChild.id == ''editTexto'') nodoNuevo.innerHTML = $(''editTexto'').innerHTML; izq = findPosX(element) - 400 + ''px''; sup = findPosY(element) + ''px''; nodoContenedor = Builder.node(''div'',{id:''div_''+id_elemento}); Element.setStyle(...
2008 Jul 01
5
Attaching event observers to a series of elements - best practice?
...nction exits. I''ve been kludging my way around the problem by storing data in the element''s id attribute (e.g., <li id="contacts-index-3">Tim Horton</ li>), but I''m not entirely happy with this solution. Suggestions? For bonus points: I like to use innerHTML to insert new content into the DOM. Yes, it''s non-standard, but it''s widely supported, and it''s much faster than the DOM methods - see http://quirksmode.org/dom/innerhtml.html. If you can suggest a clean technique that allows me to keep using innerHTML *and* attach onclic...
2007 Jul 10
6
Having trouble using data returned by Ajax.request
..."foobar.php"; function generateGraphData(dataRange,dataUrl) { new Ajax.Request(url, { method: ''get'', parameters: {dR:dataRange,dU:dataUrl}, onLoading: function() { // change this to a loading image/html $(dataRange).innerHTML="loading..."; }, onComplete: function(request) { if(request.status != 200) { // change this to a pleasant error message $(dataRange).innerHTML="unavailable..."; } else { graphData = request.responseText;...
2006 Mar 13
3
problem updating mulitple divs with ajax
...or update user then render @users = User.find(:all) @list = render_to_string :partial => "/admin/users/user_list", :layout => false logger.info @list render :template => "/admin/users/update", :layout => false update.rhtml template $(''user_form'').innerHTML = ""; $(''user_list'').innerHTML = "<%= @list -%>"; alert(''Done''); the above does not work, specifically setting the user_list innerHTML to the value of @list. if i change it to an empty string, the javascript is evaluated, both divs inn...