[Proto-Scripty] slider handle position not central for Opera?!

2009-04-04 Thread geoffcox

Hello,

The following puts the slider handle in the middle for IE7 and the
latest versions of Firefox, Chrome and Safari but not for Opera!

Is there a known problem and solution?

Cheers,

Geoff

!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
html
head
meta http-equiv=Content-type content=text/html; 
charset=utf-8 /

titleStandard Slider Demo/title
script src=assets/javascripts/prototype.js type=text/
javascript/script
script src=assets/javascripts/slider.js 
type=text/javascript/
script
/head
body

div id=track3 style=width:200px; background-color:#ccc; 
height:
10px;
div id=handle3 style=width:10px; height:15px; background-
color:#f00;cursor:move;
/div
/div
p id=debug3nbsp;/p

script type=text/javascript language=javascript
// ![CDATA[

// horizontal slider control with preset values
new Control.Slider('handle3', 'track3', {
range: $R(0,6),
values: [0,1,2,3,4,5,6],
sliderValue: 3, // won't work if set to 0 due 
to a bug(?) in
script.aculo.us
onSlide: function(v){ $('debug3').innerHTML = 
'slide: ' + v },
onChange: function(v){ $('debug3').innerHTML = 
'changed: ' + v }
});
// ]]
/script

/body
/html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Feedback on a Mega Dropdown menu

2009-04-04 Thread brad

Hello All,

I'm new to this group and to prototype  script.aculo.us.  I've tried
to implement a Mega menu (loosely based on the blog:
http://www.sitepoint.com/blogs/2009/03/31/make-a-mega-drop-down-menu-with-jquery/),
and it seems to be working to some degree.

The whole thing is here:  http://bradmontgomery.net/megamenu/

I'm using registering observers for mouseover and mouseout and I'm
using Effect.Appear and Effect.Fade with a specified ScopedQueue.

I'm I going about this correctly... are there any caveats to what I'm
doing?  I've skimmed some other drop-downs that seem to approach this
differently.

Thanks in advance!

Brad

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] element position differ due to scrollbar

2009-04-04 Thread kuldeep

hi frds,
I have div in my code with the help javascript i cover that portion
black shaded background on loading. but if i scroll my page it wont
get exect position. it come different place.so any one why this
happening.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: element position differ due to scrollbar

2009-04-04 Thread Maarten

On Apr 4, 1:24 pm, kuldeep kuldeep.rathor...@gmail.com wrote:
 hi frds,
 I have div in my code with the help javascript i cover that portion
 black shaded background on loading. but if i scroll my page it wont
 get exect position. it come different place.so any one why this
 happening.

Hi,

I have no experience with this, but I would give getScrollOffsets a
try:

 window.scrollTo(0, 120);
 document.viewport.getScrollOffsets();
 //- { left: 0, top: 120 }

See http://www.prototypejs.org/api/document/viewport/getscrolloffsets.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Re: slider handle position not central for Opera?!

2009-04-04 Thread geoffcox75


 Is there a known problem and solution?

I have just realised that this problem is not due to any error in the
way I've coded my page as the same happens with this example

http://www.aldenta.com/examples/script.aculo.us/slider-standard.html

With Opera the handle is not in the centre for the lower horizontal
slider.

Help needed!

Cheers

Geoff
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---



[Proto-Scripty] Importing Tag Soup Using AJAX

2009-04-04 Thread Doug Reeder

I need to import a variety of outlines, marked up in varying ways --  
XOXO, HTML, XHTML, etc., without knowing what my app is receiving  
before it arrives.  I use the Ajax object to access the content, and  
the text of the document always appears in the responseText field of  
the Ajax.Response.   (If it happens to be XML, there's a Document in  
Ajax.Response.responseXML as well, but I can't depend on that since  
the outlines aren't always XML.)   I do _not_ want to import the  
responseText into the main Document -- it must be heavily processed.

I have written code (see below), which works, but seems to be rather  
clunky; in particular the lines:
   // turn tag soup into something searchable
respDoc = document.createDocumentFragment();
var respRoot = document.createElement(foo);
respDoc.appendChild(respRoot);
respRoot.innerHTML = ajaxResponse.responseText;

Is there some clean way to turn ajaxResponse.responseText into a tree  
of DOM nodes (or better yet, DOM nodes and extended Elements), that  
strips out any JavaScript?


Here's my code:

// helper function
// listRoots is an Array
function findListRoots(parentNode, listRoots) {
var children, c, child, nodeNameL;
children = parentNode.childNodes;
for (c=0; cchildren.length; ++c) {
child = children[c];
if (child.nodeType === Node.ELEMENT_NODE) {
nodeNameL = child.nodeName.toLowerCase();
if (nodeNameL === ul || nodeNameL === ol) {
listRoots.push(child);
} else {
findListRoots(child, listRoots);
}
}
}
}


// the onSuccess function for Ajax
function respondImportXOXO(ajaxResponse) {
var respDoc;
var outlineRoots = [];
var lists, i, listElem, className;
var h1Elem;

// turn tag soup into something searchable
respDoc = document.createDocumentFragment();
var respRoot = document.createElement(foo);
respDoc.appendChild(respRoot);
respRoot.innerHTML = ajaxResponse.responseText;


// finds title or h1 element
var projectTitle;
if (typeof respDoc.title === string  respDoc.title.length  0) {
projectTitle = respDoc.title;
} else {
respDoc = respRoot;
h1Elem = respDoc.getElementsByTagName(h1)[0];
if (h1Elem !== undefined) {
projectTitle = h1Elem.textContent;
} else {
projectTitle = My Project;
}
}
log(projectTitle: \ + projectTitle + \);

respDoc = respRoot;
// finds outline roots
lists = respDoc.getElementsByTagName(ul);
for (i=0; ilists.length; ++i) {
listElem = lists[i];
log(listElem);
className = listElem.getAttribute(class);
if (typeof className === string) {
if (className.indexOf(xoxo) = 0) {   // match
outlineRoots.push(listElem);
log (outline root (XOXO));
}
}
}

lists = respDoc.getElementsByTagName(ol);
for (i=0; ilists.length; ++i) {
listElem = lists[i];
log(listElem);
className = listElem.getAttribute(class);
if (typeof className === string) {
if (className.indexOf(xoxo) = 0) {   // match
outlineRoots.push(listElem);
log (outline root (XOXO));
}
}
}


// if no outline roots defined by class, use all lowest-level lists
if (outlineRoots.length === 0) {
findListRoots(respDoc, outlineRoots)
}

// import each outline root
log(outlineRoots.length +  outline roots);
for (i=0; ioutlineRoots.length; ++i) {
try {
// process outlineRoots[i]
} catch (error) {
log(error);
if (typeof error.message === string) {
alert(error.message);
} else {
//alert(Object.toJSON(error));
alert(error);
}
}
}
}


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Prototype  script.aculo.us group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~--~~~~--~~--~--~---