bpops Posted December 23, 2006 Share Posted December 23, 2006 I have submitted snippets of this code before. The site I am creating works fine in Firefox, but throws back an error in IE. Here is the url:http://www.b-pops.com/boxartist/gc.shtmlIf anyone can tell me why this doesn't work in IE, I would be extremely grateful. I've been working on this for quite a while with no success.As you'll see, the page updates automatically in Firefox. You can change background colors, add a title, etc. IE however, gives errors that I can't track down.Also, here is the javascript that I'm using (included in the header of that page):[code]// JavaScript Documentfunction change_bg(){ var image_url = create.background.value; var color = create.bg_color.value; var repeat = create.bg_repeat.value; var position_vert = create.bg_position_vert.value; var position_hor = create.bg_position_hor.value; box = document.getElementById('box'); position = position_vert+' '+position_hor; box.style.backgroundImage = 'url("'+image_url+'")'; if (color){ box.style.backgroundColor = color; } box.style.backgroundRepeat = repeat; box.style.backgroundPosition = position; }function change_title(){ var title = document.create.title.value; var title = title.replace('\n', '<br>'); var font_family = document.create.font_family.value; var font_custom = document.create.font_custom.value; var font_size = document.create.font_size.value; var font_color = document.create.font_color.value; var font_style = document.create.font_style.value; var title_position_vert = document.create.title_position_vert.value; var title_position_hor = document.create.title_position_hor.value; main = document.getElementById('main'); if(font_family == 'custom'){ font_family = font_custom; } main.innerHTML = title; if(font_color){ main.style.color = font_color; } main.style.fontFamily = font_family; main.style.fontSize = font_size; main.style.color = font_color; main.style.fontWeight = font_style; main.style.textAlign = title_position_hor; main.style.verticalAlign = title_position_vert; }/*function change_esrb(rating){ esrb = document.getElementById('esrb'); rating = 'images/logos/'+rating; esrb.src = rating; }*/function change_patch(image,patch_num){ if(image == 'custom'){ if(patch_num == 'patch_1'){ image = document.create.patch_1_custom.value; } if(patch_num == 'patch_2'){ image = document.create.patch_2_custom.value; } if(patch_num == 'patch_3'){ image = document.create.patch_3_custom.value; } }else{ image = 'images/logos/'+image; } patch_num = document.getElementById(patch_num); patch_num.src = image; }function only_for(image){ image = 'images/logos/'+image; only_img = document.getElementById('only_img'); if(document.create.only.checked){ only_img.src = image; }else{ only_img.src = 'images/logos/blank.gif'; } }[/code] Link to comment https://forums.phpfreaks.com/topic/31691-works-in-firefox-error-in-ie-help/ Share on other sites More sharing options...
fenway Posted December 26, 2006 Share Posted December 26, 2006 Seems to work in IE7, as far as I can see... I'll have to wait until I get home to test in on IE6. Link to comment https://forums.phpfreaks.com/topic/31691-works-in-firefox-error-in-ie-help/#findComment-147767 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.