The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 ViewsI know the way you are supposed to include external css is <link>, but it's been conflicting with my php code when I use the <link> tag for some reason.
Would I be breaking some standard or something by using <? include('cssfile.css'); ?> instead of just importing it through <link>?
I don't think it would be inefficient or wouldn't work right, but I haven't heard of anyone doing it like that before and I wanted to check before I base an entire site's style off of that method of importing.
At 7/30/07 03:43 PM, DarkScythes wrote: I don't think it would be inefficient or wouldn't work right, but I haven't heard of anyone doing it like that before and I wanted to check before I base an entire site's style off of that method of importing.
please explain how its conflicting with your PHP, and give us a sample of your code. css files are done externally so that they can be cached. its much quicker to load a page when the viewer has already saved all of the pertinent stylistic information.
<h2>ShoutBox</h2>
<p>
<form method = 'post' action = 'index.php'>
Name: <input type = 'text' name = 'name' class = 'textarea' /><br />
Msg: <textarea name = 'msg' rows = '4' cols = '15' class = 'textarea'></textarea><br />
<input type = 'submit' value = 'Submit' name = 'submitBtn' class = 'submitBtn' onClick = '<? shoutbox(); ?>' ><br />
</form>
</p>
<p>
<? echo($fData); ?>
</p>
that's the form code. and when I click the submit button to run the shoutbox function which adds the user input into a flat file. $fData is the information from the file.
When I click the button sometimes it'll (normally only in firefox) strip the <link> tag for some reason and the entire page will just be pure html.
At 7/30/07 03:50 PM, DarkScythes wrote: <h2>ShoutBox</h2>
that's the form code. and when I click the submit button to run the shoutbox function which adds the user input into a flat file. $fData is the information from the file.
lovely form and all, but that didnt contain what shoutbox() was, nor where your <link> was, nor really the overlying structure of your page.
When I click the button sometimes it'll (normally only in firefox) strip the <link> tag for some reason and the entire page will just be pure html.
that may have something to do with the javascript youre using in the onClick (should be onclick) property. that may be any number of things, but im confused if youre aware of what the onclick is meant for, since it seems to ME like you have no clue. you can only use that handler for js.
the <link> is in the head
and as to what the function does "that's the form code. and when I click the submit button to run the shoutbox function which adds the user input into a flat file."
I can tell I doubt I'm going to get much help on this one :/ I'll just rewrite the entire code in a different way and hope it works.
Thanks for explaining the onclick/javascript thing though (:
okok, disregard my last post. I made a little example of what happens. (You might need firefox for it to work).
http://jelix.heliohost.org/testing/index .php
Just click the submit button on that page. It's just a simple form with not even any code or anything in it, but when you use it, it strips the <link> out and makes the CSS code on the page not import.
That's what I was trying to explain.
Side note: As echo is a language construct and not a function, it doesn't need the parentheses.
> twitter.
sorry for the triple post (really >>;) but you might have to refresh the page once before it strips the tag.
Works fine for me.
Using latest version of Firefox by the way.
At 7/30/07 04:31 PM, DarkScythes wrote: sorry for the triple post (really >>;) but you might have to refresh the page once before it strips the tag.
Ah... disregard my last post.
Apart from the, obivously automatically prepended, ad, the style seems to be before the html, not in the head.
"My software never has bugs. It just develops random features. " - Unknown
[ FluxBB developer | Quickmarks 0.5.1 | Strings & Ints - my blog ]
Works fine for me.
try refreshing the page after you submit. It normally will pop up with a message telling me that I am using POSTDATA and when I click ok it refreshes the page but deactivates the <link> tag.
Side note: As echo is a language construct and not a function, it doesn't need the parentheses.
I know, but it just is easier for me to use parentheses because it seems more organized for me :/
I tried moving it above the html to see if that fixed anything and it didn't :/ It's back in the head now though.
Do you think it's the ad that's doing it or something?
At 7/30/07 04:36 PM, DarkScythes wrote: I know, but it just is easier for me to use parentheses because it seems more organized for me :/
It's not wrong. ;-)
Usually syntax highlighters do a good job of organising.. and you can also use comment blocks to separate your code out, they're nice.
> twitter.
At 7/30/07 04:29 PM, DarkScythes wrote: That's what I was trying to explain.
PLEASE tell me why you are listing properties as propertyname = "something"?
there are to be no spaces around the equal sign. (propertyname="something")
once again. Organization.
Apparently I've been doing a lot of bad coding techniques for the sake of organization D:
I'll fix it.
._.
I fixed the space problem but still my css is messed up every time I submit the form and refresh.