Jump to content

Recommended Posts

hey guy i have a script which will add fields to a div but when i view the div's html it has a <style> added to the input/label and break tags but i dont undertstand why...especially has the page hasnt got a style sheet yet...if anyone could help me undstand why this is happening please?

 

html added to div

input_field = '<label for="' + field_name + '">' + field_label + ' ' + count + ' : </label><input id="'+ field_name +'" name="' + field_name + '" type="' + field_type + '" value="" />';

 

html inside div

<label style="display: inline;" for="game_types1">Game Type - Name 1 : </label><input style="display: inline;" id="game_types1" name="game_types1" value="" type="text">

 

thanks you

Im going to guess your using Chrome, or Firefox. Both browsers try to correct things within HTML, trying to display everything uniformly as far as code goes.. So depending on what the rest of your page looks like, that could just be the browser being itself. However, it could be something from any given script your pulling into your page.. the one liner you showed, I dont see why it would do that, soo its from something else be it your scripting or the browsers automated bahavior.

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.