Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: portalguy123
  • Order by date
  1. portalguy123

    Evaualte a String containg new line characters..

    Hello Lee, The problem is that its autogenrated, I will have to keep doing complex string manipulations using complex RegExps..
  2. portalguy123

    Evaualte a String containg new line characters..

    OK Tsuji, Interesting...I can confirm it was not becuase of the comments but becuase of the if statement, now that I am ignoring the if statment it works fine I ignore it becuase the condition that if statement checks is always false and teh object it checks for always exists, but it seems...
  3. portalguy123

    Evaualte a String containg new line characters..

    Tsuji, I for sure wont be offended , I am always learning .. :-)
  4. portalguy123

    Evaualte a String containg new line characters..

    Thanks Kaht, You were right the eval was not working becuase of the comments , I have removed the comments using split method becuase I know that the first two lines will always be comments , and after stripping those comments eval works like a charm.And no the script does not contain any html...
  5. portalguy123

    Evaualte a String containg new line characters..

    Thank you kaht and tsuji, I was trying kaht's suggestion first and it seems the regexp does not replace the comments the string is as it is after the replace with no changes..can you please look into that.. I am using the following code result2.replace(/\/\/.*\n/g, ""); alert ('Result 2...
  6. portalguy123

    Evaualte a String containg new line characters..

    Hello Kaht, No, I cant remove it becuase that script is being auto generated.
  7. portalguy123

    Evaualte a String containg new line characters..

    Hi cLFlava, What is the the workaround for this other than using eval?
  8. portalguy123

    Evaualte a String containg new line characters..

    This script is auto generated from the portal framework, and is part of teh ajax response which gets populated in the innerHTML of a div element, I need to eval it so that the values it puts the mapping object reflect globally.And thats why I was trying to eval it.
  9. portalguy123

    Evaualte a String containg new line characters..

    Hello Experts, I have a scenario where I need to eval a string which contains newline characters..The string result2 has the following script as its value, however when I evaluate the string with eval(result2); it seems it does not get evaluated ..Please let me know if there is a workaround for...
  10. portalguy123

    Dynamically Generated JavaScript

    Ok it seems that the problems is that the following code is not being evaluated ... var result2 has the following value;and eval(result2) has not effect , can anyone shed some light on this aspect of the problem.. Thanks. result2= // Build the netui_names table to map the tagId attributes...
  11. portalguy123

    Dynamically Generated JavaScript

    I am hiting one roadblock after another after evaluating the script extracted in the above post , I dotn see the values in the netui_names object.I am using the following code to extract the scipt from the above example and evaluating them as follows but I dotn see the values in netui_names...
  12. portalguy123

    Eval to evaluate javascript function

    Lets say you get a Ajax response and in it there are autogenerated javascript functions which you need to be made availabel in a global context, for which they have to evaled, how would you do that??
  13. portalguy123

    Dynamically Generated JavaScript

    I am trying to extract the java script in the following text... // **** This section contains code that will run when the page is loaded **** // Build the netui_names table to map the tagId attributes // to the real id written into the HTML if (netui_names == null) var netui_names = new...
  14. portalguy123

    Dynamically Generated JavaScript

    Now that it seems I cant have the script element populated with the script code in the string var , I have chnaged my approach to extract the java script and evaluate it , I get an error for the following regexp , can anyone please let me know what might be wrong with this RegExp. Thanks in...
  15. portalguy123

    Eval to evaluate javascript function

    Hello Gorge, I am facing the same problem , did you find any solution to evaluate the function in eval..Can you please share your findings.
  16. portalguy123

    Dynamically Generated JavaScript

    Unfortunately ,it needs to work in IE at the least..
  17. portalguy123

    Dynamically Generated JavaScript

    Hello Dan, Thanks for the reply, I able to print the innerHTML of the head before appending the script element to teh head element. I have tried multiple scenarios, all of them fail.Before I mention them , just to let you know the JS is in a string not in a file or filename. Case 1: Try to...
  18. portalguy123

    Dynamically Generated JavaScript

    Though its a AJAX scenario, its a general javascript issue, I wouldnt think it to be AJAX specific..
  19. portalguy123

    Dynamically Generated JavaScript

    Hello Lee, Thanks for the reply!Are you asking what the top of teh HTML looks after the head element is appended with a script element? I think the problem Iam facing is that the script element has a src attribute which can only point to a URL ,but in my case I have the script in a variable ...
  20. portalguy123

    About loading a script with AJAX

    Hello Jakob, This is Bob again, your solution works fine when the javascript code has a reference to a file but, can you think of any solution if the retunred response has the actual javascript code in the returned document like <script></script>.The problem is in this case you cant use...

Part and Inventory Search

Back
Top