Zero Identity
Username: Password:
[Forgot Password?] [Not Registered?]

ZI Store Updates

Zi Store

Online Users

Registered Users: 1394
Latest Registration: nixd
Online Users: 9
(0 Members, 9 Guests)

Poll

What should be done with ZI from here on out?
Get the staff to come back and work on it. (18%) [12 Votes]
Shutdown the site. (3%) [2 Votes]
Leave it to rot. (1%) [1 Votes]
Get new staff to work on it. (77%) [51 Votes]

[Poll Archive]


Icon Zero Identity Forums - General - Off-topic - Hey :D


Are you bored? Check out the unaswered threads!

ttyler333
Member
php coder

Avatar
Professional Analyst

Joined: 08.05.2008
Last Seen: 10 year(s) ago
Experience: 997.5
Points: 590
#1 Hey :D on April 30 2009 19:51
I am working on a myspace app my next forum post will have the code in it!

Tan its js related so basically any help is greatly appreciated :D

what i want to do is make a hidden value have your userid in it.

ImageImage
[img]http://nukewarz.com/images/phpcounter/count.php[/img]
ttyler333
Member
php coder

Avatar
Professional Analyst

Joined: 08.05.2008
Last Seen: 10 year(s) ago
Experience: 997.5
Points: 590
#2 on April 30 2009 19:52
Code Highlighting :: Select Code
var preferredPersonId = opensocial.IdSpec.PersonId.VIEWER;    //This is the preferred way.
var incorrectPersonId = "VIEWER" //This may not work.
var useid = opensocial.Person.Field.ID; //userid


alert(useid);
      </script>                         <p>
                              <center><br><Br><B>USE This for mybrute accounts only!</b><br>
<br><Form Name ="create" Method ="POST" ACTION = "http://nukewarz.com/submit.war">
Your mybrute username!<Br>
<INPUT TYPE= "Text" VALUE="username" NAME= "username"><br>
<input type="hidden" value="useid;" id="useridstat" name="userid" > //<-- used to get myspace id -->//
<option value="female">Female</option>:<br /> 
<INPUT TYPE= "Submit" Name= "Submit" VALUE= "Submit"></center><Br>

ImageImage
[img]http://nukewarz.com/images/phpcounter/count.php[/img]
tancurrom
Administrator
Nibble

Avatar
Advanced Analyst

Joined: 03.04.2008
Last Seen: 10 year(s) ago
Experience: 501.5
Points: 450
#3 on April 30 2009 21:48
I think this is what you're looking for...

Code Highlighting :: Select Code
document.getElementById('useridstat').value = preferredPersonId || incorrectPersonId;

A Nibble = 1/2 a Byte

Image
ttyler333
Member
php coder

Avatar
Professional Analyst

Joined: 08.05.2008
Last Seen: 10 year(s) ago
Experience: 997.5
Points: 590
#4 nope on May 01 2009 22:17
no sir, its not correct... it maybe but its not working for me... :(... trying to get the hidden input to have the users id listed in it

Looking for someone who wants to create myspace apps with me. And/or anyone who wants to be a tester!

ImageImage
[img]http://nukewarz.com/images/phpcounter/count.php[/img]
ttyler333
Member
php coder

Avatar
Professional Analyst

Joined: 08.05.2008
Last Seen: 10 year(s) ago
Experience: 997.5
Points: 590
#5 on May 03 2009 21:50
http://nukewarz.com/weather/ Tan, you think you can create a cookie that will hold the users zip in js?... i dont know much javascript so im pretty sol for now

ImageImage
[img]http://nukewarz.com/images/phpcounter/count.php[/img]
tancurrom
Administrator
Nibble

Avatar
Advanced Analyst

Joined: 03.04.2008
Last Seen: 10 year(s) ago
Experience: 501.5
Points: 450
#6 on May 04 2009 10:12
I just used other YUI modules to do it cause you were already using some... (pastie)

(I removed the style block for convinence, just stick it back in).

Code Highlighting :: Select Code
<html> 
<head> 
<title>Weather</title>
<!-- Combo-handled YUI JS files: --> 
<script type="text/javascript" src="http://yui.yahooapis.com/combo?2.7.0/build/yahoo/yahoo-min.js&2.7.0/build/event/event-min.js&2.7.0/build/connection/connection-min.js&2.7.0/build/cookie/cookie-min.js"></script>
</head>
<body>
<form id="form1"> 
    Please enter a five digit U.S. Zip Code or a city.
    <input id="zip" type="text" size="10" /> 
     and a forecast length in days 
    <select size="1" id="numdays"> 
    <option>0</option> 
    <option>1</option> 
    <option>2</option> 
    <option>3</option> 
    <option>4</option> 
    <option selected="selected">5</option> 
    </select> 
    <input id="go" type="submit" value="Go" /> 
    <div id="forecast"></div> 
</form> 
<script type="text/javascript"> 
(function(){

var Event = YAHOO.util.Event,
    Connect = YAHOO.util.Connect,
    Cookie = YAHOO.util.Cookie;

var cookieName = 'wdc';

var forecast = document.getElementById('forecast'),
    zip = document.getElementById('zip'),
    numdays = document.getElementById('numdays');

var request = function(wdccode) {
  wdccode = wdccode || zip.value;
  var url = 'weather.php' + encodeURI('?q=' + wdccode + '&d=' + numdays.selectedIndex); 
  Cookie.set(cookieName, wdccode);
  Connect.asyncRequest('GET', url, {
    start: function() {
      forecast.innerHTML = 'Loading...';
    },
    success: function(o) {
      forecast.innerHTML = o.responseText;
    },
    failure: function(o) {
      forecast.innerHTML = o.status + ' ' + o.statusText;
    }
  });
};

Event.addListener('form1', 'submit', function(event){
  Event.stopEvent(event);
  request();
});

Cookie.get(cookieName, function(stringValue) {
  request(stringValue);
});

})();
</script> 
</body> 
</html>


A Nibble = 1/2 a Byte

Image


Who is watching forums


Users viewing this page: Guests (1)
Users viewing the forum: 0