Forum Moderators: open
<HTML>
.
.
.
.
<SCRIPT>
if(conditionalStatement == 0){
stop printing HTML to screen here
}
</SCRIPT>
If conditionalStatement was not met...
.
.
.
.
.
</HTML>
I hope that this makes some sense. The way I have it working now, is pathetic and not reliable at all. I hope that this is possible.
The way I have it now is like above, but instead of the if like above, I have
if(conditionalStatement!= 0){
Print the stuff I dont want if conditionalStatement = 0.
}
I do a document.write() statement with a <FORM> inside and the <FORM> does not work. I click on my submit button and there is nothing in the query string. I think this is a bad way to do it anyway. It makes the HTML inside the document.write() very confusing and hard to edit.
Anyways, I hope that someone can offer some advise with this.
Thanks in advance
D O N
I agree with msr986's other point: browser's with Javascript turned off and some old browsers won't get the effect you want. So if you have php or perl on the server, that would be a better way.
Shawn
There is a lot of talk that Google is about to implement new hidden text filters over the next few weeks or months. This has many SEO's concerned. How well do you think a filter can determine that an entire hidden div is legitimate? Personally, I don't think it's worth taking the chance until we know more about what's going to happen.
Personally I think that the algorithms would have to be good enough to not make such a stupid blunder as banning a site such as MeyerWeb's css dev edge. If it were, then google's results would become unreliable, and google would have to improve the algorithms or lose some of their share of the search engine users. Lots of sites use hidden divs or layers for perfectly legitimate purposes, and I am confident that before google implements, they test. That said, I know we live in the real world., so you are right, no point taking chances.
Shawn
Here is a simple example of how to do it with includes:
Put the hide/show content into a file called whatever.php.
In the page that is shown/hidden, the code would look something like this.
<?php
$con = 2;
if ($con == 1)
{
include ("whatever.php");
}
?>
If you don't want to use an include, you can always just echo the content or call it up from a database. Also you should consider how you are going to set $con to 1; does the user set it or do you? An advantage of this is that you don't have to worry about hidden text with google... disadvantage would be having to convert to .php extensions.