Hey,
I''ve run into a little trouble with my script, when a user is logged
in to my system they get this piece of extra code under the div for a
picture (so that they can drag it).
<b>The actual DIV''s code is:</b>
[code]
<div id="sticker-1" title="1"
class="sticker_cactus" style=''positon:
absolute; left: 54px; top: 190px; z-index: 317; ''
onClick="zIndex(this);"><img src="store/images/
delete_entry_button.gif" align="right" href="#"
onclick="remove_sticker(''sticker-1'');"
/></div>
[/code]
<b>The other CSS (defined in another CSS File) for that DIV is:</b>
[code]
.sticker_cactus {
min-width: 86px;
min-height: 80px;
max-width: 86px;
max-height: 80px;
height: 80px;
width: 86px;
background-image: url(misc/sticker_cactus_anim.gif);
}
[/code]
<b>The javascript which is in the source if you''re logged
in.</b>
[code]
<script type="text/javascript" language="javascript"
charset="utf-8">
// <![CDATA[
new Draggable(\''sticker-''. $echo12[ "id" ]
.''\'',
{
scroll:window,
revert:isNotWithinPlayground,
zIndex:''.$z_index.''
}
);
// ]]>
</script>
[/code]
My problem is, the div''s don''t show up in the right position
on the
page UNLESS you are logged in and get that piece of javascript, do you
have any idea of how I can play around to fix this? I''m only 15, so
I''m not great with Javascript, I''m only good at PHP/XHTML/SQL
lol.
(Also, if you need my entire code just ask).
Thanks
Simon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Oops, forgot to mention. The actual javascript code which you''d find
for the DIV if you went in view->source would be:
[code]
<script type="text/javascript" language="javascript"
charset="utf-8">
// <![CDATA[
new Draggable(''sticker-1'',
{
scroll:window,
revert:isNotWithinPlayground,
zIndex:317
}
);
// ]]>
</script>
[/code]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
The draggable is probably setting position:absolute on one of the elements On 7/27/07, Simon <sfserver-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Oops, forgot to mention. The actual javascript code which you''d find > for the DIV if you went in view->source would be: > > [code] > <script type="text/javascript" > language="javascript" > charset="utf-8"> > // <![CDATA[ > > new Draggable(''sticker-1'', > { > > scroll:window, > > revert:isNotWithinPlayground, > zIndex:317 > } > ); > // ]]> > > </script> > [/code] > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
I believe the problem may be around here, <div id="sticker-1" title="1" class="sticker_cactus" style=''positon: absolute; left: 54px; top: 190px; z-index: 317; '' first thing, there should be doublequotes around the style attribute. Whilst there is a typo for position (positon), which probably means the css isn''t registered by the browser. I would suggest you get firebug aswell to be able to inspect dom elements individually, this will allow you check the elements style attributes, and makes debugging a lot easier. Hope that helps Mr P. On 27/07/07, Gareth Evans <agrath-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > The draggable is probably setting position:absolute on one of the elements > > On 7/27/07, Simon <sfserver-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Oops, forgot to mention. The actual javascript code which you''d find > > for the DIV if you went in view->source would be: > > > > [code] > > <script type="text/javascript" > > language="javascript" > > charset="utf-8"> > > // <![CDATA[ > > > > new Draggable(''sticker-1'', > > { > > > > scroll:window, > > > > revert:isNotWithinPlayground, > > zIndex:317 > > } > > ); > > // ]]> > > > > </script> > > [/code] > > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---