Short attributes in tags

Hi Paul,

I saw this thread earlier today and knew I’d faced this same problem before but just couldn’t locate the Action I was thinking about.

After a bit of testing it appears the solution is to pass an empty string into your attributes;

function fwAfterEndHTML(){
	var head = fwDocument.fwTags.fwFind("head",fwPage);
	var myScript = head.fwAddOpt("script",true);	
	
	myScript["src"] = fwQuote("javscript.js");
	myScript["type"] = fwQuote("text/javascript");
	
	myScript["async"] = "";
	myScript["defer"] = "";
}

which gives you;

<script src="javscript.js" type="text/javascript" async defer></script>

I had thought that setting the fwTitle or fwValue on the attribute to null would do the job.


actionsdev mailing list
email@hidden
Update your subscriptions at: