Well im trying to create a profile but i have come across a problem i think one of my vars are not working which is wrecking the whole code and i cant continue untill i have found the problem can someone please help, thanks.
Code:
- <script type="text/javascript">
- if(location.href.match(//view_profile/)){
- var display_name = get('display_name','id').innerHTML;
- var birthday = get('birthday','id').innerHTML;
- var age = get('age','id').innerHTML;
- var gender = get('gender','id').innerHTML;
- var posts = get('posts','id').innerHTML;
- var location = get('location','id').innerHTML;
- var date_registered = get('date_registered','id').innerHTML;
- var email = get('email','id').innerHTML;
- var xfire = get('xfire','id').innerHTML;
- var msn = get('msn','id').innerHTML;
- var aim = get('aim','id').innerHTML;
- var googletalk = get('googletalk','id').innerHTML;
- var icq = get('icq','id').innerHTML;
- var yahoo = get('yahoo','id').innerHTML;
- var website = get('website','id').innerHTML;
- var signature = get('signature','id').innerHTML;
- var last_online = get('last_online','id').innerHTML;
- var local_time = get('local_time','id').innerHTML;
- var last_ip = get('last_ip','id').innerHTML;
- var recent_posts = get('recent_posts','id').innerHTML;
- var account_notes = get('account_notes','id').innerHTML;
- var vp = '<table align="center" width="840" border="0" cellspacing="1" cellpadding="3" class="border"><tr><td colspan="3" class="title1"><strong>User Profile </strong></td></tr><tr><td class="title1"><strong>Personal Infomation </strong></td><td class="title1"><strong>Contact Infomation </strong></td><td class="title1"><strong>Recent Visitors</strong></td></tr><tr><td class="window1">'+display_name+'<br>'+birthday+'<br>'+age+'<br>'+gender+'<br>'+location+'<br>'+website+'<br>'+posts+'<br>'+date_registered+'</td><td class="window1">'+email+'<br>'+msn+'<br>'+aim+'<br>'+googletalk+'<br>'+icq+'<br>'+yahoo+'</td><td class="window1">Ill ad recent visitions php file here soon i will.</td></tr><tr><td colspan="2" class="window1">'+signature+'</td><td class="window1">'+last_online+'<br>'+local_time+'<br>'+last_ip+'<br>'+recent_posts+'<br>'+account_notes+'</td></tr></table>';
- get('full_profile','id').parentNode.innerHTML = '<table width="840" cellpadding="3" cellspacing="1" class="border" id="full_profile" align="center"><tr><td class="window1" valign="top">'+vp+'</td></tr></table>';
- }
- </script>
Do you have a forum where you are testing it as it would help me to see it? (also the 'select all' button is hiding!![]()
http://russell.vforums.co.uk/
and select all should now be viewable![]()
Simple mistake...
try fixing:
if(location.href.match(//view_profile/)){
Turn it to:
if(location.href.match(/\/view_profile/)){
http://russell.vforums.co.uk/action/view_profile/user/admin/
I dont think anything has changed
one problem is that there are some fields that are either hidden or not visible to all members/staff etc...
So you'd have to do something like:
var birthday = (get('birthday','id'))? get('birthday','id').innerHTML : '';
That'd sort the error, and do that for all of the variables!![]()
I have changed it to this, but still nothing![]()
Code:
- <script type="text/javascript">
- if(location.href.match(/\/view_profile/)){
- var birthday = (get('birthday','id'))? get('birthday','id').innerHTML : '';
- var display_name = (get('display_name','id'))? get('display_name','id').innerHTML : '';
- var age = (get('age','id'))? get('age','id').innerHTML : '';
- var gender = (get('gender','id'))? get('gender','id').innerHTML : '';
- var posts = (get('posts','id'))? get('posts','id').innerHTML : '';
- var location = (get('location','id'))? get('location','id').innerHTML : '';
- var date_registered = (get('date_registered','id'))? get('date_registered','id').innerHTML : '';
- var email = (get('email','id'))? get('email','id').innerHTML : '';
- var xfire = (get('xfire','id'))? get('xfire','id').innerHTML : '';
- var msn = (get('msn','id'))? get('msn','id').innerHTML : '';
- var aim = (get('aim','id'))? get('aim','id').innerHTML : '';
- var googletalk = (get('googletalk','id'))? get('googletalk','id').innerHTML : '';
- var icq = (get('icq','id'))? get('icq','id').innerHTML : '';
- var yahoo = (get('yahoo','id'))? get('yahoo','id').innerHTML : '';
- var website = (get('website','id'))? get('website','id').innerHTML : '';
- var signature = (get('signature','id'))? get('signature','id').innerHTML : '';
- var last_online = (get('last_online','id'))? get('last_online','id').innerHTML : '';
- var local_time = (get('local_time','id'))? get('local_time','id').innerHTML : '';
- var last_ip = (get('last_ip','id'))? get('last_ip','id').innerHTML : '';
- var recent_posts = (get('recent_posts','id'))? get('recent_posts','id').innerHTML : '';
- var account_notes = (get('account_notes','id'))? get('account_notes','id').innerHTML : '';
- var vp = '<table align="center" width="840" border="0" cellspacing="1" cellpadding="3" class="border"><tr><td colspan="3" class="title1"><strong>User Profile </strong></td></tr><tr><td class="title1"><strong>Personal Infomation </strong></td><td class="title1"><strong>Contact Infomation </strong></td><td class="title1"><strong>Recent Visitors</strong></td></tr><tr><td class="window1">'+display_name+'<br>'+birthday+'<br>'+age+'<br>'+gender+'<br>'+location+'<br>'+website+'<br>'+posts+'<br>'+date_registered+'</td><td class="window1">'+email+'<br>'+msn+'<br>'+aim+'<br>'+googletalk+'<br>'+icq+'<br>'+yahoo+'</td><td class="window1">Ill ad recent visitions php file here soon i will.</td></tr><tr><td colspan="2" class="window1">'+signature+'</td><td class="window1">'+last_online+'<br>'+local_time+'<br>'+last_ip+'<br>'+recent_posts+'<br>'+account_notes+'</td></tr></table>';
- get('full_profile','id').parentNode.innerHTML = '<table width="840" cellpadding="3" cellspacing="1" class="border" id="full_profile" align="center"><tr><td class="window1" valign="top">'+vp+'</td></tr></table>';
- }
- </script>
Go through and check it, your syntax is all wrong.
get('birthday','i 0;'
for example...![]()
for some reason is changed when i pasted??
but it looks as if its almost working but it keeps changing and the page never completely loads.
Example
try adding:
break; before the last }
Well that has stopped the loading problem but now its like the code it not there at all.
Sorry
Remove that. And change:
get('full_profile','id').parentNode.innerHTML = vp;
to :
get('full_profile','id').innerHTML = vp;
I think that almost worked but there is still this problem with "Invalid Module" and it adds loads of strange info onto the url.
ok, you can't use 'location' as a variable. Rename it to something like: 'person_loc' that should fix it all!![]()
oh ok thanks