JavaScript Passing URL as parameter in JS function passing parameters function javascript,passing parameter function c++,passing parameter

This is my code:

var url = f.href.value;
ed.dom.setAttribs(e, {
    href : 'javascript:void(0)',
    onclick: 'doSomething(' + url + ')'
});

And the doSomething method:

function doSomething(url) {
    windowMy = dhxWins.createWindow("externalLink", 10, 10, 630, 630);
    windowMy.setText("Title");
    windowMy.attachURL(url);
}

When doSomething is called, I get the error: Uncaught SyntaxError: Unexpected token :, when url="http://somewebsite/site".

What should I do? How can I pass url as parameter in JS function?

Answer:1

When I am trying to do this: var element_current_classes=($("#form_div :textarea").attr('class')); or this: var element_current_classes=($("#form_div :select").attr('class')); I am getting this ...

When I am trying to do this: var element_current_classes=($("#form_div :textarea").attr('class')); or this: var element_current_classes=($("#form_div :select").attr('class')); I am getting this ...

  1. find elements inside element selenium
  2. find elements inside iframe
  3. find elements inside div jquery
  4. find elements inside div javascript
  5. find elements inside iframe jquery
  6. find elements inside iframe selenium
  7. find all elements inside a div jquery
  8. find elements inside element selenium python
  9. jquery find elements inside parent
  10. selenium find elements inside div
  11. jquery find elements inside
  12. jquery find elements inside container
  13. how to find elements inside a frame using selenium
  14. javascript find elements inside element
  15. protractor find elements inside element

I am trying to call JavaScript inside XSLT but it keeps on failing. I am using the Xalan namespace. I'm calling Java as well and that works no problem, but for some reason the JavaScript doesn't. <...

I am trying to call JavaScript inside XSLT but it keeps on failing. I am using the Xalan namespace. I'm calling Java as well and that works no problem, but for some reason the JavaScript doesn't. <...

  1. javascript include call function

I'm trying to make a program that you can enter the dimensions of a Rubik's cube eg. 13x13x13 and the program tells you how many permutations there are for that Rubik's cube. I have the math to figure ...

I'm trying to make a program that you can enter the dimensions of a Rubik's cube eg. 13x13x13 and the program tells you how many permutations there are for that Rubik's cube. I have the math to figure ...

I've got a range slider which I'm using to control a value in an input box. The values we're using can be quite high on the max end so we wanted finer control for smaller numbers before spanning out ...

I've got a range slider which I'm using to control a value in an input box. The values we're using can be quite high on the max end so we wanted finer control for smaller numbers before spanning out ...