collapse

Author Topic: JS Help needed  (Read 1007 times)

0 Members and 1 Guest are viewing this topic.

Offline Shortie

  • Administrator
  • Authority
  • *
  • Posts: 5710
  • The Ultimate Boss
  • OS:
  • Windows 7Windows 7
  • Browser:
  • Firefox 3.1b3Firefox 3.1b3
    • View Profile
    • Graphics Mayhem
JS Help needed
« on: April 20, 2009, 06:04:59 PM »
HI

HELP HELP HELP

I need a function like this one

Code: [Select]
/* Converts < and > into < and > */
function decodeHTML(text)
{
var DecodeVar = /<([^&]*)>/g;
return text.replace(DecodeVar,"<$1>");
}

But will change a string like this

Code: [Select]
There is really a lot of customizing that can be done with the sidebar styler in Vista.  The hover feature can let you use a light or dark skin over your skin to make it glow or dim with mouseover, or using two entirely different styles, you can flip the shadow of a skin to the opposite side, etc....so you get into customizing and then MS takes it awa...

to this

Code: [Select]
There is really a lot of customizing that can be done with the sidebar styler in Vista.  The hover feature can let you use a light or dark skin over your skin to make it glow or dim with mouseover, or using two entirely different styles, you can flip the shadow of a skin to the opposite side, etc....so you get into customizing and then MS takes it awa...
e.g.

will remove the box and size tags etc

So

I heed help - as I am still learning JS

Shortie

« Last Edit: April 20, 2009, 06:11:47 PM by Shortie »

Thank You, "Guest" For Reading My Post.


Offline Shortie

  • Administrator
  • Authority
  • *
  • Posts: 5710
  • The Ultimate Boss
  • OS:
  • Windows 7Windows 7
  • Browser:
  • Firefox 3.1b3Firefox 3.1b3
    • View Profile
    • Graphics Mayhem
Re: JS Help needed
« Reply #1 on: April 20, 2009, 06:12:20 PM »
Here is another test string

Code: [Select]
Actually, I was mistaken.  The #24 theme, kinda silver/blue.  Doesn't seem to matter what I set in Profile, Look and Layout, when I come back is always Dark Blue theme showing, even though I don't log out....  :(

Thank You, "Guest" For Reading My Post.


Offline NerdBoy

  • Graphics Mayhem Designer
  • Global Moderator
  • Expert
  • *
  • Posts: 4835
  • Computer Nerd/Tech Junkie
  • OS:
  • Windows VistaWindows Vista
  • Browser:
  • Firefox 3.1b3Firefox 3.1b3
    • View Profile
Re: JS Help needed
« Reply #2 on: April 20, 2009, 07:47:32 PM »
Shorty from what I can gather from the code this has something to do with the sidebar this stuff is over my head but I wonder is this not just a waste off your time seeing as the next OS does not have sidebar to speak of . Wish I could help with this but it is like speaking  french to me I understand bits and pieces but that is it . :)
Thank You,"Guest" For Reading My Post.
 

http://www.michelespaintshop.com/mp_tubes1_index.php

Offline SoLoGHoST

  • SMF MOD Expert!
  • Connoisseur
  • *
  • Posts: 2375
  • OS:
  • Windows VistaWindows Vista
  • Browser:
  • Microsoft IE 8.0Microsoft IE 8.0
    • View Profile
Re: JS Help needed
« Reply #3 on: April 20, 2009, 09:01:52 PM »
Shortie, going off your original post, you wanna be able to subtract
Code: [Select]
from the beginning and
Code: [Select]
from the end?

Is this what you want??  you could just use substr() function or substring() function if that is the case.

If you are wanting to convert html entities < and > into < and >:

Code: [Select]
/* Converts < and > into < and > */
function decodeHTML(text)
{
var getText = '';
var x = 0;
while(x <= text.length - 1) {
var getSign = text.substr(x, 4);

if (getSign == "<")
getSign = "<";
else if (getSign == ">")
    getSign = ">";
else
getSign = text.charAt(x);

getText += getSign;

if ((getSign == ">") || (getSign == "<"))
x=x+4;
else
x++;
}

return getText;
}
« Last Edit: April 20, 2009, 09:07:33 PM by SoLoGHoST »

Offline SoLoGHoST

  • SMF MOD Expert!
  • Connoisseur
  • *
  • Posts: 2375
  • OS:
  • Windows VistaWindows Vista
  • Browser:
  • Microsoft IE 8.0Microsoft IE 8.0
    • View Profile
Re: JS Help needed
« Reply #4 on: April 20, 2009, 09:17:46 PM »
Then just call it like this in your function or whatever:
Code: [Select]
text = decodeHTML(text);

Hope you don't mind that I moved this out of the Gadget Code Library as it doesn't seem to belong there IMO.
« Last Edit: April 20, 2009, 09:19:23 PM by SoLoGHoST »

Offline Shortie

  • Administrator
  • Authority
  • *
  • Posts: 5710
  • The Ultimate Boss
  • OS:
  • Windows 7Windows 7
  • Browser:
  • Firefox 3.1b3Firefox 3.1b3
    • View Profile
    • Graphics Mayhem
Re: JS Help needed
« Reply #5 on: April 21, 2009, 01:55:42 AM »
Shorty from what I can gather from the code this has something to do with the sidebar this stuff is over my head but I wonder is this not just a waste off your time seeing as the next OS does not have sidebar to speak of . Wish I could help with this but it is like speaking  french to me I understand bits and pieces but that is it . :)

Yep

It doesn't have a side bar but it has gadgets so there if still a future in it - also someone will write a sidebar even if it is a little like Fences from StarDock

Shortie

Thank You, "Guest" For Reading My Post.


Offline NerdBoy

  • Graphics Mayhem Designer
  • Global Moderator
  • Expert
  • *
  • Posts: 4835
  • Computer Nerd/Tech Junkie
  • OS:
  • Windows VistaWindows Vista
  • Browser:
  • Firefox 3.1b3Firefox 3.1b3
    • View Profile
Re: JS Help needed
« Reply #6 on: April 21, 2009, 05:56:14 AM »
Yeah well some people are still using XP but that does not mean I do , I have actually forgotten what XP looks like. When Windows 7 is released I will move on maybe not right away this time I will wait a bit before I buy it . Also who knows maybe there will be no more gadgets either when Windows 7's successor is released this is just my opinion but I think gadets will slowly fade away they will probably be replaced with something different this is just Nerdboy looking into his crystal ball.  :)
« Last Edit: April 21, 2009, 05:57:32 AM by NerdBoy »
Thank You,"Guest" For Reading My Post.
 

http://www.michelespaintshop.com/mp_tubes1_index.php

Offline Shortie

  • Administrator
  • Authority
  • *
  • Posts: 5710
  • The Ultimate Boss
  • OS:
  • Windows 7Windows 7
  • Browser:
  • Firefox 3.1b3Firefox 3.1b3
    • View Profile
    • Graphics Mayhem
Re: JS Help needed
« Reply #7 on: April 21, 2009, 06:41:57 AM »
You are probably right

But there will be a successor of some-kind - perhaps it will be a head up display using virtual reality to control the PC hence there wont be a mouse or monitor - WOW how much space will that save me :D:D(actually someone has already done that)

Any way technology will change and that is the fun - maybe we will have Gizmos instead of Gadgets  :):):)

Shortie


Thank You, "Guest" For Reading My Post.


Offline NerdBoy

  • Graphics Mayhem Designer
  • Global Moderator
  • Expert
  • *
  • Posts: 4835
  • Computer Nerd/Tech Junkie
  • OS:
  • Windows VistaWindows Vista
  • Browser:
  • Firefox 3.1b3Firefox 3.1b3
    • View Profile
Re: JS Help needed
« Reply #8 on: April 21, 2009, 06:50:06 AM »
Sometimes the tech changes so fast its unbelievable and in some instances it move so slow its painful . Speech recognition is just finally starting to get good enough to use . :)
Thank You,"Guest" For Reading My Post.
 

http://www.michelespaintshop.com/mp_tubes1_index.php

Offline SoLoGHoST

  • SMF MOD Expert!
  • Connoisseur
  • *
  • Posts: 2375
  • OS:
  • Windows VistaWindows Vista
  • Browser:
  • Microsoft IE 8.0Microsoft IE 8.0
    • View Profile
Re: JS Help needed
« Reply #9 on: April 21, 2009, 11:38:10 AM »
Believe it or not, I know many people who are still using Windows XP, and haven't made the change to Vista.  Wanted to install Vista on my neighbors PC, but found out he didn't even have enough Processor Speed recommended which was 733 MHz, lol.  Well, anyways, people around here are a little slow on the new technology, but I try to stay ahead of the game.  And there's always you guys to help out in that field :)

Offline NerdBoy

  • Graphics Mayhem Designer
  • Global Moderator
  • Expert
  • *
  • Posts: 4835
  • Computer Nerd/Tech Junkie
  • OS:
  • Windows VistaWindows Vista
  • Browser:
  • Firefox 3.1b3Firefox 3.1b3
    • View Profile
Re: JS Help needed
« Reply #10 on: April 21, 2009, 06:22:44 PM »
Wow even my 5 year old laptop runs Vista it is an AMD Sempron 1.8 GHz . I can't Imagine anything Slower than my Laptop it irritates me sometimes when rendering graphics. :)
Thank You,"Guest" For Reading My Post.
 

http://www.michelespaintshop.com/mp_tubes1_index.php

 


* Search



* Latest Activity.

A GM Wallpaper by NerdBoy
[Yesterday at 07:31:24 AM]


Next Topic Page 1.2 by NerdBoy
[December 15, 2010, 06:28:37 PM]


Windows 8 Wallpaper Concepts by NerdBoy
[December 14, 2010, 09:31:08 PM]


Who can make me a custom mod? by VintageJetBoats
[December 13, 2010, 10:35:47 AM]


December 2010 Uptop Logo Contest by NerdBoy
[December 12, 2010, 07:01:48 PM]


Icon request by NerdBoy
[December 10, 2010, 06:39:27 PM]


Ultimate Weather by NerdBoy
[December 10, 2010, 12:22:41 PM]


General Wallpapers by NerdBoy
[December 10, 2010, 12:17:18 PM]


Logo request by NerdBoy
[December 09, 2010, 08:26:51 AM]


Nerdboy's Birthday by NerdBoy
[December 07, 2010, 06:02:44 AM]


Happy Birthday Shortie by MJCSD
[December 05, 2010, 08:48:02 PM]