Search:
Type: Posts; User: rpg2009
Search :
Search took 0.01 seconds.
I don't use frameworks yet myself, but how do other engines compare. Sly, YUI, or just sizzle standalone?
With YUI you can pick and choose the modules you need can't you?
RPG
just for a bit of practice. hope you don't mind
Javascript
(function(doc){
var oFF = { A : ['B','C','D','E','F','G','H'],
B : ['A','G','H'],
C :...
A bit of fun. Very basic and very rough around the edges though.
(function(global, doc){
// Dummy Constructor
var Jcopy = function(selector, root){
return new Jcopy.init(selector,...
The problem starts here line 4
line 4 : $("a#demo").fancybox({....
Looking through your source with a find for 'demo'. The phrase isn't found.
So it appears there isn't an anchor element...
A stab in the dark. Looking at your source you're including Jquery after allwebscripts. So allwebscripts try's '$(document)' before jquery has loaded.
Can you move allwebscripts to a line after...
Nice one! Chuffed it worked out mate.
It's there. var sid = '*' + ......
Good luck:)
RPG
Okay out of my depth here. Different rules for applets. And a brief read says that your original method (javascript entities?) should have worked but isn't supported in IE?
How about this then?
...
JSLint's an extremely handy tool. I've tended to switch on assume browser anyway, without really knowing what it does. Thanks for that info.
Another take as you possibly want to drag your code out...
Well after a bit of trial and error I think I might be a bit closer to a solution. 'Famous last words'
If you look at the code that goes into frameworks like jquery you'll see a fix for IE and...
Also Kever's picked up on (.*), which will greedily grab everything and then backtrack. Not ideal and might end up with an unintended match.
.*? is better. The trailing non greedy? prevents that.
I just tested the code, substituting window.location.href with 'http://www.sitetobeiframed.com?username=anybody'
In chrome the generated html for param reads
<param name="SID" value="*anybody">
I might have the wrong end of the stick, and it won't be the first time, but you did see this
var sid = document.getElementsByName('SID')[0];
sid.value = "*" + getUrlVars()["username"];
This...
Tcobb,
Didn't my post above cover that:confused:
function trim(strg) {
return strg.replace(/^\s\s*/,'').replace(/\s\s*$/, '');
}
function getWithAttribute( attr, name, root ) {
By no means an expert but would something like this work
<html>
<head>
</head>
<body bgcolor="#FFFFFF">
<body>
<div style="width: 100%; text-align: center;">
I had considered that with name : 'undefined'. John Doe does the trick.
Confusion of terminology on my part regarding multiple inheritience. I was referring to deeper chains. Now you mention...
I think you're getting it onefootswill.
function F(){}; // constructor
F.prototype = proto; // prototypal inheritence
return new F(); // new??
A few experiments using my functions above.
A small edit
var extend = function ( obj, to ) {
var that = to || this,
prop;
for ( prop in obj ){
if ( obj.hasOwnProperty(prop) ) {
Fair enough:D Saw the familiar functionF(){} and was just going by memory. Nice to go over these thing from time to time though.
Regards Object.create I'm sure the mdc page used to have...
A few other methods.
You could use inherit
function Person(name){
this.name = name;
}
Person.prototype.getName = function(){
Or this maybe?
var strg = 'addfriend\.php\?id=1\\\" |||||| addfriend\.php\?id=2\\\" |||||| addfriend\.php\?id=3\\\" ';
var regEx = /\?id=(\d+)/gi,
match;
while((match =...
If you do really need to target multiple id this should do the trick.
<!doctype html>
<html>
<head>
<title>Get with Attribute</title>
</head>
<body>
<p id = 'id_1'>Some Text1</p>
An object would make more sense and is clearer.
If you have to use arrays as you're just learning about them. Then you could maybe try something like this? (Purely as a learning exercise)
...
in chrome
console.dir(document.getElementById('just_a_textbox'));
and there it is 'checked: false'