User Profile

Collapse

Profile Sidebar

Collapse
NKTA
NKTA
Last Activity: Jul 15 '10, 06:25 PM
Joined: Jan 27 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • NKTA
    started a topic HTML DOM Array data to XML

    HTML DOM Array data to XML

    Hello.

    I was wondering if it was possible to pick up a HTML DOM array builted by me, that has as example:
    Code:
    [Main Array]
      [Array 1]
    - ID, valueX, valueY, ID2, valueX2, valueY2, etc
    - text, text, ...
      [Array 2]
    - ID, valueX, valueY, ID2, valueX2, valueY2, etc
    - text, text, ...
    [Main Array End]
    I want to export this data to the XML format, but just this data....
    See more | Go to post

  • NKTA
    replied to what is the codes used to do that job?
    I have another question...


    If i define the whole intire page including declairing the scripts it as i have stated, is it possible to call a function in the second page opened ?

    The only reference to that page i have is the variable in which i have declared the new window => someVar, so can i do something like:
    someVar.functio nToCall();
    or
    someVar.documen t.functionToCal l();
    Or is...
    See more | Go to post

    Leave a comment:


  • NKTA
    replied to what is the codes used to do that job?
    Yeap, but in my case, its 2 page in the same doamin, and still using DOM is not possible. Gives error.
    The 2 pages are located in the same place in the disk, i intended to re-use the format from one page and add some objects to it.

    I solved by using
    Code:
    someVar = window.open(...);
    var tmp = someVar.document;
    tmp.write(' and in here i have put the HTML code of my page ');
    for(var ...){
    ...
    See more | Go to post

    Leave a comment:


  • Honestly, if you had used switch(action) statement instead of those if's, the code would not only simplier as easier to spot any errors.
    By the way, whats is what you want spefically to search for ?
    Would help if could add your own doubts and questions.
    Code:
    switch(action){
            case 0:
                 whatever you want to do
            break;
            case 1:
            break;
            default:
    ...
    See more | Go to post

    Leave a comment:


  • NKTA
    replied to what is the codes used to do that job?
    And check this also, it concerns to your problem, and also mine, trying to use DOM to access another page.
    Search ...
    See more | Go to post

    Leave a comment:


  • NKTA
    started a topic DOM on new open window

    DOM on new open window

    Hello.


    I have a question regarding method window.open(... ) or open(...).

    If i use this method to open a new window, is it possible to use DOM to append objects to that same window, or is it restricted.

    I have been searching for foruns and web in general, there seems not having a straight answer.

    Giving an example, with an event Listener i detect the keypress "Enter", which...
    See more | Go to post

  • I have already checked the link, and honestly is pretty cool how he discover the position, resuming and please correct me if i am wrong,
    curtop and curleft will be adding each distance both from the element to his father and plus the distance from his father to his own father and so on untill reaches the end and no more parents can be found.
    But there's a but, but not butt, .. i'm trying to use object after trying to use same function...
    See more | Go to post

    Leave a comment:


  • Hello, and thank you for answering.

    Forgot to post what i have been trying.

    This is how far i got:

    Code:
    if ( obj.id == "*the original button" || obj.id == "*the original button") {					// This cycle creates the ciopy and puts on top of the original object. The original object, by the other side continues attached to the event and whatever i wnat to do with it.
    				newIMG =
    ...
    See more | Go to post

    Leave a comment:


  • Find the position of an image on a table and place an image on top.

    Hello again.

    I have a doubt in how to obtain the position of an image in a table cell.

    What i want to do is:
    - Find the image position, and add a new image on top of that image.

    The problem, is that the image is inserted in the table so doing with the offset (Left / Top) gives its position regarding its offsetparent and posts the nem image in the wrong place. How do i discorver the image position...
    See more | Go to post

  • NKTA
    replied to Javascript Erase all Nodes at once.
    I have already another assignment so therefore remember to post the code.

    HTML:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    	<title>Multiple Questions Form</title>
    	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    	<script
    ...
    See more | Go to post

    Leave a comment:


  • NKTA
    replied to Javascript Erase all Nodes at once.
    Hello.
    As soon i defend my work i will post the entire code to alls benefit. Just give me some time.
    I'm truly sorry, but in my faculty they search the code for any similarities in the web, so must be certain they will see that i have ask for help but the working project is due to my efforts, and not somebody else.
    But i like to share, and when i doo it will al in english plus the comments where tricky parts are.
    ...
    See more | Go to post

    Leave a comment:


  • NKTA
    replied to Javascript Erase all Nodes at once.
    Well have found the problem with firefox, had to redesign the function and works well know, for all browser.

    I need to be more carefull when dealing with dynamic spaces since firefox doesn't deal well with dynamic vars.
    See more | Go to post

    Leave a comment:


  • NKTA
    replied to Javascript Erase all Nodes at once.
    Sadly no, i have been googling and found several solutions.
    1st using a counter for words. Spliting at a certain count and inserting an enter.
    2nd using the tag <wbr> but fails due to the use of <pre> to ensure the whole format of the text inserted by a user.

    The script is working, but besides the problem with breaking the line, in firefox the answer for multiple choice ain't showing. Opera and IE8 working...
    See more | Go to post

    Leave a comment:


  • NKTA
    replied to Javascript Erase all Nodes at once.
    Oh, the last break and breaks outside the curve parentesis ( { } ), will fix that. Thank You.
    See more | Go to post

    Leave a comment:


  • NKTA
    replied to Javascript Erase all Nodes at once.
    Nope. I already edit the rows and cols to the ideal size of the textarea. The problem is that the text captured from the "textarea" input when is re-writen as a textnode it does not respect the screen bondaries, i.e. it continues all to the right whrn is written in simple text on the html. Its just the same as writing simple text in html, it goes all the way to the right.
    See more | Go to post

    Leave a comment:


  • NKTA
    replied to Javascript Erase all Nodes at once.
    Thank You, but i'm using it.

    But the error isn't specific. It's the same as said in last post.
    Since it doesn't give me a specific line of error, you could say i'm fishing.

    BR

    Code:
    Line: ?
    Error: ?	Unhandled exception: [Object DOMException]
    
    file://.../Trabalho.Pratico/QuestQuestoesMultiplas/QuestTeorico.html?Radio=2&nodeAction=on
    Unhandled exception: [Object
    ...
    See more | Go to post

    Leave a comment:


  • NKTA
    replied to Javascript Erase all Nodes at once.
    Just added a line of code that prevents the script opera from ignoring or crashing. Now it simply doesn't execute addNode, previously it wiped all information in page and restarted the script.
    Code:
    	var inRadio = document.getElementById("radioButtons").value;
    	var inRadio2 = parseInt(inRadio);
                if ( isNaN( inRadio ) || inRadio2 == " "  ){ ... }
                if ( ! isNaN( inRadio ) &&
    ...
    See more | Go to post

    Leave a comment:


  • NKTA
    replied to Javascript Erase all Nodes at once.
    the problem is that it works very well on IE8 but not in mozilla or opera. Gonna edit the code so that you understand .


    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
        <title>Multiple question form</title>
        <meta http-equiv="Content-Type" content="text/html;
    ...
    See more | Go to post

    Leave a comment:


  • NKTA
    replied to Javascript Erase all Nodes at once.
    Hi.

    Thats what i was thinking. I re-edit to remove as unnecessary parts as i could in the code and still manage to keep it to work. Due to another post, i have also removed any elements iunnecessary in the nodes.

    Try it on IE8 to seeu full action, but then on F and Opera, well ...

    So the interface is something like this:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    ...
    See more | Go to post

    Leave a comment:


  • NKTA
    replied to Javascript Erase all Nodes at once.
    Well you are right. But i think the problem here is what use i want to it.

    In my case its a multiple choice form. I create a dinamic div so therefore i create an input to indicate the number of multiple choices. With that input, "lets say n" i create:
    - n checkboxes
    - plus n textareas to insert answers to choose. (these 2 as child nodes)
    If i press button these elements will be added.
    i dont want...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...