Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,256
Total Threads: 81,169
Total Posts: 566,839
There are 43 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     Other Programming Languages :

My first usefull ajax script!

Thread title: My first usefull ajax script!
Closed Thread  
Page 2 of 4 < 1 2 3 4 >
    Thread tools Search this thread Display Modes  
08-08-2007, 06:55 PM
#11
.Samuel is offline .Samuel
Status: I'm new around here
Join date: Aug 2007
Location:
Expertise:
Software:
 
Posts: 8
iTrader: 0 / 0%
 

.Samuel is on a distinguished road

  Old

Doesn't work for me, sorry.

08-08-2007, 07:15 PM
#12
Haris is offline Haris
Status: Request a custom title
Join date: Dec 2005
Location:
Expertise:
Software:
 
Posts: 2,741
iTrader: 9 / 100%
 

Haris is on a distinguished road

  Old

Many people still have js disabled. The script doesn't work when javascript is disabled.

-10

08-08-2007, 08:22 PM
#13
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,892
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

Originally Posted by Haris View Post
Many people still have js disabled. The script doesn't work when javascript is disabled.

-10
People who disable javascript are used to not having many things. IE is as far as I will cater to.

08-08-2007, 08:29 PM
#14
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,892
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

Originally Posted by Blue Ire View Post
Why use inline js? Wouldn't it be better to simply write the complete setup in php and html, and use js to intercept the specified actions? This way it functions perfectly without js, and with js you get the niceties. The way it is now it works without js only if you hit enter, button is useless. Just a thought.
How would I do that? I am not a javascript guru by any means.

08-08-2007, 08:39 PM
#15
Salathe is offline Salathe
Salathe's Avatar
Status: Community Archaeologist
Join date: Jul 2004
Location: Scotland
Expertise: Software Development
Software: vim, PHP
 
Posts: 3,820
iTrader: 25 / 100%
 

Salathe will become famous soon enough

Send a message via MSN to Salathe

  Old

Originally Posted by Village Idiot View Post
I just made a URL shortener with php and ajax, any critique?
http://justanotherportfolio.com/url/
There are lots of things I'd like to bring up, because of that I'll be brief with each.
  • XHTML Transitional?
  • Usability: Put the submit button after the input field.
  • Usability: Make it work without JS
  • Usability: No mention of what should be entered in the input field (a valid URL?)
  • Usability: No visual cue upon submitting the AJAX request -- only when response is received.
  • Why use META refresh rather than appropriate HTTP headers?
  • Hard-coded to 'shorten' google link, not the value input into the form.
  • Why not unobtrusively apply the JavaScript rather than hard-coding it into the form opening tag? (Look into window.onload, or even better when the DOM is ready)

Sorry for so many, especially since they're all pretty minor points in the grand scheme of things.

08-08-2007, 08:55 PM
#16
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,892
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old


  • XHTML Transitional?
  • Fixed, must have copied the wrong doctype



  • Usability: Put the submit button after the input field.
  • done



  • Usability: Make it work without JS
  • How?



  • Usability: No mention of what should be entered in the input field (a valid URL?)
  • Will do



  • Usability: No visual cue upon submitting the AJAX request -- only when response is received.
  • It takes a split second to process, but il do it.




  • Why use META refresh rather than appropriate HTTP headers?
  • What? Im not using any refresh.




  • Hard-coded to 'shorten' google link, not the value input into the form.
  • Oops, I put that in during debugging, fixed.



  • Why not unobtrusively apply the JavaScript rather than hard-coding it into the form opening tag? (Look into window.onload, or even better when the DOM is ready)
  • Not sure how to do what you are talking about.

08-09-2007, 09:11 PM
#17
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,892
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

How do I make this work without javascript?

08-10-2007, 07:19 PM
#18
eldafar is offline eldafar
Status: I'm new around here
Join date: Jun 2007
Location:
Expertise:
Software:
 
Posts: 13
iTrader: 0 / 0%
 

eldafar is on a distinguished road

  Old

Unless you really want to learn all the intricacies of the different implementations of the ecmascript, I suggest you just use jquery.

08-10-2007, 07:58 PM
#19
localhost is offline localhost
localhost's Avatar
Status: Dediport Hosting
Join date: Jul 2006
Location: Berkshire
Expertise: programming, business
Software: Dreamweaver
 
Posts: 1,316
iTrader: 17 / 100%
 

localhost is on a distinguished road

  Old

Hey, Nice script.. The only problem is when I convert a URI, I copy it properly and then paste it, click enter and it looks for http://converting.../

Any idea why?

08-10-2007, 08:11 PM
#20
Village Genius is offline Village Genius
Village Genius's Avatar
Status: Geek
Join date: Apr 2006
Location: Denver, CO
Expertise: Software
Software: Chrome, Notepad++
 
Posts: 6,892
iTrader: 18 / 100%
 

Village Genius will become famous soon enough

  Old

Originally Posted by localhost View Post
Hey, Nice script.. The only problem is when I convert a URI, I copy it properly and then paste it, click enter and it looks for http://converting.../

Any idea why?
fixed

Closed Thread  
Page 2 of 4 < 1 2 3 4 >


Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed