Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > absolute pos. layer and css inline/and external

Reply
Thread Tools

absolute pos. layer and css inline/and external

 
 
se
Guest
Posts: n/a
 
      08-15-2010
I have a hidden absolute pos. div to popup with some
information. Just to find out that javascript requires me to
have the styles inline.
There must be a way to tell javascript to look for the
styles externally/ or on the parent page.
How does this look like?.
Thanks!
/se
 
Reply With Quote
 
 
 
 
Gregor Kofler
Guest
Posts: n/a
 
      08-15-2010
Am 2010-08-15 07:42, se meinte:
> I have a hidden absolute pos. div to popup with some
> information. Just to find out that javascript requires me to
> have the styles inline. There must be a way to tell javascript to look
> for the
> styles externally/ or on the parent page.


Huh? What parent page? What inline/external "styles"?

> How does this look like?.


Depends.
element.style.display = "none" => element.style.display = ""
element.style.left = "-10000px" => element.style.left = "0px"
element.className = "hidden" => element.className = "shown"
....

Gregor

--
http://vxjs.gregorkofler.com
 
Reply With Quote
 
 
 
 
Denis McMahon
Guest
Posts: n/a
 
      08-15-2010
On 15/08/10 06:42, se wrote:
> I have a hidden absolute pos. div to popup with some
> information. Just to find out that javascript requires me to
> have the styles inline. There must be a way to tell javascript to look
> for the
> styles externally/ or on the parent page.
> How does this look like?.
> Thanks!


Please include a link to your page so we can see what you're doing and
maybe work out what's wrong with it.

Rgds

Denis McMahon
 
Reply With Quote
 
se
Guest
Posts: n/a
 
      08-15-2010

"Denis McMahon" <(E-Mail Removed)> skrev i meddelelsen
news:4c6811e3$0$5802$(E-Mail Removed)...
> On 15/08/10 06:42, se wrote:
>> I have a hidden absolute pos. div to popup with some
>> information. Just to find out that javascript requires me to
>> have the styles inline. There must be a way to tell javascript to look
>> for the
>> styles externally/ or on the parent page.
>> How does this look like?.
>> Thanks!

>
> Please include a link to your page so we can see what you're doing and
> maybe work out what's wrong with it.
>
> Rgds
>
> Denis McMahon


Nothing wrong with my pages. Like I said, the styles are placed in
the absolute position div-layer, and so it works correctly when
getting a
document.getElementId("nameofdivlayerID").style.vi sibility="visible";
no problem in that case.
The hidden layer:
<div id="nameofdivlayerID" style="visibility:hidden;
position:absolute; z-index:10; left: 100px; top:50px; ----" >
----------
----------
</div>
I want the styles in a stylesheet or in the document
head. Doing so, the script stop working. -The layer stay hidden.
Having all those styles inline really looks messy.
If you can't do without having me to post my site here, then
stop thinking in my problem. If you've been participating on
newsgroups for couple of years or so, you got to know what happens
with a site posting it's url there. The site is immidiately picked
up by spambots and ends up anywhere. Just like this post here
perhaps ends up on egg-cafe.
Do you think that's raising page-rank having ones url spread around
on places that's not related to the page content of the site.
On the contrary!.
/se

 
Reply With Quote
 
Gregor Kofler
Guest
Posts: n/a
 
      08-15-2010
Am 2010-08-15 20:24, se meinte:

> Nothing wrong with my pages. Like I said, the styles are placed in
> the absolute position div-layer, and so it works correctly when
> getting a
> document.getElementId("nameofdivlayerID").style.vi sibility="visible";
> no problem in that case.
> The hidden layer:
> <div id="nameofdivlayerID" style="visibility:hidden;
> position:absolute; z-index:10; left: 100px; top:50px; ----" >
> ----------
> ----------
> </div>
> I want the styles in a stylesheet or in the document
> head. Doing so, the script stop working. -The layer stay hidden.
> Having all those styles inline really looks messy.


Indeed.

> If you can't do without having me to post my site here, then
> stop thinking in my problem.


Given your problem description, there's nothing really to think about yet.

> If you've been participating on
> newsgroups for couple of years or so, you got to know what happens
> with a site posting it's url there.


What? I frequently place my webpage in the sig.

> The site is immidiately picked
> up by spambots and ends up anywhere.


Even worse: It might end up in the *WORLD WIDE WEB*. Seriously, what's
the problem with spambots "picking up" my website or not? Isn't the idea
to make ones webpage as popular as possible (at least most of the time).
Do have to relearn what I know or think to know about the WWW?

> Just like this post here perhaps ends up on egg-cafe.


Given the quality of your post - good that you chose a nym.

> Do you think that's raising page-rank having ones url spread around
> on places that's not related to the page content of the site.
> On the contrary!.


I have read this above sentence several times - it still eludes me, what
you wanted to say.

Gregor (note: that's my real name, and the website below is a real URI,
and the domain is owned by me, and I don't give a damn, where it ends up)


--
http://vxjs.gregorkofler.com
 
Reply With Quote
 
se
Guest
Posts: n/a
 
      08-15-2010

"Gregor Kofler" <(E-Mail Removed)> skrev i meddelelsen
news:i49i84$4p5$(E-Mail Removed)...
> Am 2010-08-15 20:24, se meinte:
>
>> Nothing wrong with my pages. Like I said, the styles are placed in
>> the absolute position div-layer, and so it works correctly when
>> getting a
>> document.getElementId("nameofdivlayerID").style.vi sibility="visible";
>> no problem in that case.
>> The hidden layer:
>> <div id="nameofdivlayerID" style="visibility:hidden;
>> position:absolute; z-index:10; left: 100px; top:50px; ----" >
>> ----------
>> ----------
>> </div>
>> I want the styles in a stylesheet or in the document
>> head. Doing so, the script stop working. -The layer stay hidden.
>> Having all those styles inline really looks messy.

>
> Indeed.
>
>> If you can't do without having me to post my site here, then
>> stop thinking in my problem.

>
> Given your problem description, there's nothing really to think about yet.
>
>> If you've been participating on
>> newsgroups for couple of years or so, you got to know what happens
>> with a site posting it's url there.

>
> What? I frequently place my webpage in the sig.
>
> > The site is immidiately picked
>> up by spambots and ends up anywhere.

>
> Even worse: It might end up in the *WORLD WIDE WEB*. Seriously, what's the
> problem with spambots "picking up" my website or not? Isn't the idea to
> make ones webpage as popular as possible (at least most of the time). Do
> have to relearn what I know or think to know about the WWW?
>
>> Just like this post here perhaps ends up on egg-cafe.

>
> Given the quality of your post - good that you chose a nym.
>
>> Do you think that's raising page-rank having ones url spread around
>> on places that's not related to the page content of the site.
>> On the contrary!.

>
> I have read this above sentence several times - it still eludes me, what
> you wanted to say.
>
> Gregor (note: that's my real name, and the website below is a real URI,
> and the domain is owned by me, and I don't give a damn, where it ends up)
>
>
> --
> http://vxjs.gregorkofler.com


You're right, I ended up on *WORLD WIDE WEB*. but with yours.
Here's the result testing your page. This test possibly explains why
we get no answers here other than *objections*
Refereing also to the "me" thread about a dozen of lines from this post;
I agree with:

> (This "how do I ?", "You don't." pattern in newsgroups is getting tiring;
> if you want to help someone, help them; if you just want to express your
> disdain for other people, start a blog or something.)


> Marc.


Here's the test of yours. You stated above "don't care"
Does this eludes you:

W3C CSS Validator results for http://vxjs.gregorkofler.com/ (CSS level 2.1)
Sorry! We found the following errors (26)

 
Reply With Quote
 
Gregor Kofler
Guest
Posts: n/a
 
      08-15-2010
Am 2010-08-15 23:35, se meinte:

>> --
>> http://vxjs.gregorkofler.com

>
> You're right, I ended up on *WORLD WIDE WEB*. but with yours.
> Here's the result testing your page. This test possibly explains why
> we get no answers here other than *objections*
> Refereing also to the "me" thread about a dozen of lines from this post;
> I agree with:
>
>> (This "how do I ?", "You don't." pattern in newsgroups is getting
>> tiring; if you want to help someone, help them; if you just want to
>> express your disdain for other people, start a blog or something.)


This is usenet, not a helpdesk. (And with your problem "description" a
psychic might come in handy.)

> Marc.
>
> Here's the test of yours. You stated above "don't care"
> Does this eludes you:


Elude me what?

> W3C CSS Validator results for http://vxjs.gregorkofler.com/ (CSS level 2.1)
> Sorry! We found the following errors (26)


And your point is? That my CSS sports level 2.1 errors? Indeed, since
these are CSS3 and/or proprietary properties like opacity or rgba()
values. It "degrades gracefully" - IE users have to live without rounded
corners.

Gregor


--
http://vxjs.gregorkofler.com
 
Reply With Quote
 
se
Guest
Posts: n/a
 
      08-15-2010
Problem solved.
I had a syntax error. I wrote this:

if (thisdoc.style.visibility=="hidden")
{ thisdoc.style.visibility="visible";}

Should be:

if (thisdoc.style.visibility="hidden")
{ thisdoc.style.visibility="visible";}

/se
 
Reply With Quote
 
rf
Guest
Posts: n/a
 
      08-16-2010

"se" <se@onfakeplace&.atbigfix> wrote in message
news:i49qji$q4u$(E-Mail Removed)-september.org...
> Problem solved.
> I had a syntax error. I wrote this:
>
> if (thisdoc.style.visibility=="hidden")
> { thisdoc.style.visibility="visible";}
>
> Should be:
>
> if (thisdoc.style.visibility="hidden")
> { thisdoc.style.visibility="visible";}


No, it probably should not. I think you are grasping at straws.

Why would you want an *assignment* inside that if statement? Surely a
logical comparison is more advisable.


 
Reply With Quote
 
Gregor Kofler
Guest
Posts: n/a
 
      08-16-2010
Am 2010-08-16 00:44, se meinte:
> Problem solved.
> I had a syntax error. I wrote this:
>
> if (thisdoc.style.visibility=="hidden")
> { thisdoc.style.visibility="visible";}
>
> Should be:
>
> if (thisdoc.style.visibility="hidden")
> { thisdoc.style.visibility="visible";}


Definitely not. In the latter case the condition always evaluates to
true, and visibility will always be set to visible.
(You have not the slightest clue of JS, have you?)

Gregor


--
http://www.gregorkofler.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How does one get an absolute absolute file path? James Byrne Ruby 3 09-14-2010 06:02 PM
business layer, data access layer , presentation layer for asp.net using C#.net Dhananjay ASP .Net 1 12-18-2006 11:35 PM
CSS Position Layer relative to bottom of another layer (cont.) Dave Smithz HTML 3 02-20-2006 05:20 PM
CSS Position Layer relative to bottom of another layer. Dave Smithz HTML 11 01-25-2006 03:01 PM
**HELP: layer as form target and refresh layer with an external file ** Federico Bari HTML 2 08-31-2003 05:56 PM



Advertisments