Solved

Ajax CSS IE8 (FF, Chrome work, but not IE8)

Posted on 2010-09-10
11
876 Views
Last Modified: 2012-05-10
Hello All;

I am trying to load some CSS through AJAX.
This works for FF and Chrome, but not in IE8 (Possibly none of the IE's)

IE8 could very well be doing it correctly, since it is running through a "div"
And css most likely is not suppose to run through a div?

Test with: FF and Chome, click the Submit, and it will change to [Black]
IE does not change...
http://ee.cffcs.com/ajax/css/1.asp
code
http://ee.cffcs.com/ajax/css/ajax.zip

Anyway around this?

On my site, I have it so people can use a Profile Create to design their profiles.
And I am using AJAX to allow for them to see everything in real-time.
This IE deal, is the only thing that is stopping the profile editor to go live
Of which I am hoping will be later on this after towards the evening.

I just ran a test to see if CSS can in fact load through a <div> and it can.
BUT, it will not load the CSS coming through the AJAX.

Thank you all.
Carrzkiss
0
Comment
Question by:Wayne Barron
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
11 Comments
 
LVL 42

Expert Comment

by:David S.
ID: 33651425
All I see on the page is "Service Unavailable".

Would you please post the relevant JavaScript code separately?
0
 
LVL 31

Author Comment

by:Wayne Barron
ID: 33651622
Yea, aint that crap.
I contacted the hosting company and they are trying to fix it.
THe bad thing is that it is only on our account.
This is the 2nd time this week that it has happened....

Maybe it will be back up later on.


ajax.zip
0
 
LVL 31

Author Comment

by:Wayne Barron
ID: 33651689
hey Kravimir
I just downloaded another code that is jQuery.
And am "attempting" to implement this project into it.
BUT, within the example that I downloaded, I was able to send the css through
So, it is the ajax that I am using here that is not working in IE8.


form.zip
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 42

Expert Comment

by:David S.
ID: 33651710
So you're receiving a <style> element with some style rules from an AJAX request and then you're just adding to a <div>? I'm not surprised that it doesn't work. For one thing, <link> and <style> elements should always be children of the <head> element. Also adding new stylesheets on the fly is more difficult than it should be (there are several compatibility issues in this area).

Why are you using AJAX anyway? As far as I can tell you're not doing anything with it that you could do directly with just JS. If you were saving the styles to a database it would make sense, but you don't seem to be doing that.

Check these out:
http://www.phpied.com/dynamic-script-and-style-elements-in-ie/
http://www.hunlock.com/blogs/Totally_Pwn_CSS_with_Javascript
0
 
LVL 42

Expert Comment

by:David S.
ID: 33651732
That other code you found is not very well written and besides jQuery 1.2.6 is rather old. The current version is 1.4.2.
0
 
LVL 31

Author Comment

by:Wayne Barron
ID: 33651748
ok.

The real site does the following.

The user is able to create their online profile before submitting it to the database.
The Ajax comes in when the user is testing the new css settings that they have created.
Once they get the styles that they want, then they choose to save it and it is inserted into the database.


Now.
The jQuery script that I just uploaded, does this.
So, I am going to work with learning on how to implement what I need with it.

have a good one
Carrzkiss
0
 
LVL 31

Author Comment

by:Wayne Barron
ID: 33651753
do you have a link to some code that is done with the new current version with ASP Classic?
That is the only example that I could find with Classic ASP and jQuery.

Thanks.
0
 
LVL 31

Author Comment

by:Wayne Barron
ID: 33651852
@Kravimir

Please let me know if you know of any tutorials with the new jQuery and Classic ASP?
If you do not, please let me know so that I am not sitting here waiting on something that is not coming...

Carrzkiss
0
 
LVL 42

Expert Comment

by:David S.
ID: 33652008
I don't use ASP myself, so no, I don't know of a better example than the one you found. You may be able to just switch in the current version of jQuery without changing the rest of the code.

There's always the chance that someone else might reply.
0
 
LVL 31

Author Comment

by:Wayne Barron
ID: 33653834
thanks
I have been playing around with the code and cannot get it to work.
Then again, I do not really understand, so it is going to be a learning process.

Have a good weekend.
Carrzkiss
0
 
LVL 31

Accepted Solution

by:
Wayne Barron earned 0 total points
ID: 33734854
This issue is resolved.
Please go here for all the information and the sample code to download and test.

http://www.experts-exchange.com/Q_26467036.html

Have a good one.
Carrzkiss
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Google Tag Manager - Add Trigger Using Div class 22 56
Time comparison asp 1 20
Change static entered data to dynamic with counter 5 35
Two decimal 5 26
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question