Jump to content

[SOLVED] Unexpected token ILLEGAL


unkwntech

Recommended Posts

I'm getting the following error on load:

Uncaught SyntaxError: Unexpected token ILLEGAL file://path/to/file.ext (line 13)

This is the code:

function changeFormLength()
{
var rows = document.getElementById('rows').value;
var i = 0;
while(i < rows)
{
                //the line under this is line 13, this line (comment) does not exist in the code
	document.getElementById('rowSpace').innerHTML += '<tr>
      <td><input type="text" name="firstname_'+i+'" id="firstname" /></td>
      <td><input type="text" name="lastname_'+i+'" id="lastname" /></td>
      <td><input name="cc_num_'+i+'" type="text" id="textfield3" size="20" maxlength="16" /></td>
      <td><label>
        <select name="cc_type_'+i+'" id="select">
          <option value="visa" selected="selected">Visa</option>
          <option value="mastercard">MasterCard</option>
          <option value="discover">Discover</option>
          <option value="amex">American Express</option>
        </select>
      </label></td>
      <td><label>
        <select name="cc_exp_m_'+i+'" id="cc_exp_m">
          <option value="01">1 January</option>
          <option value="02">2 Feburary</option>
          <option value="03">3 March</option>
          <option value="04">4 April</option>
          <option value="05">5 May</option>
          <option value="06">6 June</option>
          <option value="07">7 July</option>
          <option value="08">8 August</option>
          <option value="09">9 September</option>
          <option value="10">10 October</option>
          <option value="11">11 November</option>
          <option value="12">12 December</option>
                </select>
        /
        <select name="cc_exp_y_'+i+'" id="cc_exp_y">
          <option value="2009">2009</option>
          <option value="2010">2010</option>
          <option value="2011">2011</option>
          <option value="2012">2012</option>
          <option value="2013">2013</option>
          <option value="2014">2014</option>
          <option value="2015">2015</option>
          <option value="2016">2016</option>
          <option value="2017">2017</option>
          <option value="2018">2018</option>
          <option value="2019">2019</option>
          <option value="2020">2020</option>
        </select>
      </label></td>
      <td><input name="cc_cvv_'+i+'" type="text" id="cc_cvv" size="5" maxlength="4" /></td>
      <td><input name="amt_'+i+'" type="text" id="amt" size="10" maxlength="7" /></td>
    </tr>
';
	i++;
}
}

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.