My current code:
wp_enqueue_style( 'script-css', plugins_url( 'script/myscript.js', FILE ));
My goal:
Instead of loading the file from the plugins directory, I want to load above script file from http://mycloudfronturl.net/myscript.js
But somehow I am messing with either the quotes or while replacing the plugins_url. I am not a hard code php coder, so can someone tell me what to do please?
Thanks and Regards,
Amod
Iphone or blackberry or any other?
I do XHTML, CSS, Design, PHP work and use gmail, skype, firefox, twitter etc.
Which device would be helpful for me when i'm not at desk.
Hello,
I have been coding a site in pure HTML/CSS - using no server-side language.
I was wondering if anyone had any feedback - is there anything that you would change etc...?
Many Thanks,
J
View Site
Trying to get the next month when clicking the link_to. I've done the following in the view.
<%= form_tag rota_days_path, :method => 'get' do %>
<p>
<%= hidden_field_tag(:next_month, @t1) %>
<%= link_to 'Next Month', rota_days_path(:next_month => @next_month)%>
</p>
<% end %>
class RotaDaysController < ApplicationController
# GET /rota_days
# GET /rota_days.json
# load_and_authorize_resource
respond_to :json, :html
def index
@rota_days = RotaDay.all
@hospitals = Hospital.all
@t1 = Date.today.at_beginning_of_month
@t2 = Date.today.end_of_month
@dates = (@t1..@t2) #Concat variable t1 + t2 together
# @next_month = Date.today + 1.month(params[: ??? ] #Old
if params[:next_month]
# @next_month = Date.today >> 1
@next_month = params[:next_month] + 1.month
@t1 = @next_month.at_beginning_of_month
@t2 = @next_month.end_of_month
@dates = (@t1..@t2)
end
@title = "Rota"
respond_to do |format|
format.html # index.html.erb
format.json { render json: @rota_days }
end
end
I have identified that the reason why this may not be working is in because of the following in my controller @next_month = params[:next_month] + 1.month the last two called methods is defined only on time/date objects. but not on fixnum/string objects. I understand I am missing something from this
Update
I have found that the actual issue is that the `params[:next_month] is a string and I am trying to add a date to to it. Which means I need to convert the string to a date/time object.
Console output:
Started GET "/rota_days" for 127.0.0.1 at 2012-12-14 22:14:36 +0000
Processing by RotaDaysController#index as HTML
User Load (0.0ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
RotaDay Load (0.0ms) SELECT `rota_days`.* FROM `rota_days`
Hospital Load (1.0ms) SELECT `hospitals`.* FROM `hospitals`
Rendered rota_days/index.html.erb within layouts/application (23.0ms)
Role Load (0.0ms) SELECT `roles`.* FROM `roles` INNER JOIN `roles_users` ON `roles`.`id` = `roles_users`.`role_id` WHERE `roles_users`.`user_id` = 1 AND `roles`.`name` = 'Administrator' LIMIT 1
Completed 200 OK in 42ms (Views: 39.0ms | ActiveRecord: 1.0ms)
Can any one please tell me how can I disable the border of html? I was going to embed the html on another application and the border makes it look kind of boring.. Is there any CSS code to do this?
thanks!
Hi,
I'm using lightbox to include articles in my pages (iframes), and I'm wondering how can I assign the correct height to my lightbox (wrapping the content).
I don't have access to the height of the iFrame from css or javascript for some reason.
Could you give me some help ?
thanks
Hey guys,
I need few good book recommendations for PHP. I am trying to learn to develop webapps. I know there are other (arguably) better language out there that I should start with (ie, python). But I want to start with PHP and go from there.
My programming knowledge is limited to html/css (I know they are not actually programming languages), and I have gone through half of a python book.
Thanks! :)
Hi
This is my program .when i submit the print button i can print the datas but they are not aligned in the table formatthe format in which i need the print to be...How can i print in the correct format
<html>
<head>
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.1.min.js" > </script>
<script type="text/javascript">
function PrintElem(elem)
{
//alert('ddd');
Popup($(elem).text());
}
function Popup(data)
{
var mywindow = window.open('', 'mydiv', 'height=400,width=600');
mywindow.document.write('<html><head><title>my div</title>');
/*optional stylesheet*/ //mywindow.document.write('<link rel="stylesheet" href="main.css" type="text/css" />');
mywindow.document.write('</head><body >');
mywindow.document.write(data);
mywindow.document.write('</body></html>');
mywindow.document.close();
mywindow.print();
return true;
}
</script>
</head>
<body>
<div id="mydiv">
<table width="200" border="1">
<tr>
<td>sss</td>
<td>sssss;</td>
<td>snssbsp;</td>
</tr>
<tr>
<td>ssss;</td>
<td>sssnbsp;</td>
<td>snbsp;</td>
</tr>
<tr>
<td>snbsp;</td>
<td>snbsp;</td>
<td>snbsp;</td>
</tr>
</table>
</div>
<input type="button" value="Print Div" onClick="PrintElem('#mydiv')" />
</body>
</html>
Is there anyway to embed html hyperlinks (readable when javascript is off in the browser) within an HTML5 video player?
Maybe an embedded link within the video musing CSS, or a link in the title bar?
Thanks
i need a regular expressions string to get all anchor tags in a page with a specific css class name, in c#/vb.net
this is what i got so far
"<a.*?href=""(.*?)"".*?>(.*?)</a>"
but my attempts to add "class=name" isnt working, also is it possible to find links where the class name appears either before or after the href with one expression ?
i am familiar with 3rd party html libraries, but thats an overkill for what i have in mind, so is the webbrowser control.
rewriteCond %{REQUEST_URI} ^(ajax|css|functions|image_viewer|images|img|include|fancybox|jquery|jscript|json)$ - [L]
RewriteRule ^(.[^/])/(.[^/])/(.+[^/]) ?program=$1&usertype=$2&username=$3 [NC]
could you please help me find what is wrong in this.. ? I need to exclude some folders from url rewriting.
i tried with the solution given here.. but still i am getting some errors..
http://www.idxsync.com/sbaor/Search/Agent/zz
please help me
I am currently building a blog system, and the class file i.e class Blog{}, is running ok, when I try it on its own, but, when I try to use it in the pages of the site that have css, it looks weird and full stop, and apostrophes are replaced by strange characters! please help, this is my first time of using oo for development,
Can you create reusable components in html? Let's say I want to encapsulate some css / html and js into a tidy reusable component. How do web developers do this? I'm coming from the Flex, C# side of the planet.
I always forget :S
How do you remember which number stands for TRUE or FALSE?
(when I started css the colors black and white always confused me. Is white #FFFFFF or #000000. A trick I came up with: black is 0,because z0rr0 is dressed in …)
I have an Android project I've inherited from another developer.
The original code was hacked together using a single View and a single Activity. The view class has a State variable that is switched on during input and rendering.
Each "screen" is a single bitmap rendered directly onto the screen. There are no layouts used at all. To make things even worse each variable in both the View and Activity classes were all declared public static and would access each other frequently.
I've reworked the code so it is now somewhat manageable, but it's still in those original two classes. This is my first decently sized Android app so I'm not completely sure where to go next.
From the looks of things, each "screen" should have its own View and Activity. Is this the general practice?
If so I need some way to share data between the separate Activities. I've read suggestions to use a Singleton class that holds generic data. Is there any other ways that are more built into the Android framework?
Thanks in advance.
$('<a />').attr({
'href': '#'
})
.append(
$('<img />').attr({
'id' : 'img',
'src' : 'edit.png'
}))
.appendTo('body');
Is the the "right way" to go about adding <a href="#"><img src="edit.png" id="img" /></a> to the body?
Also how would I add some css onto the img?
i wonder if ruby on rails have bundles, the ones similar in django?
kind of a plugin that contains css, js, images, ruby code and everything for one feature.
thanks
Hi All,
I am wondering is there any way we can test the font size/color of a webpage in IE6+. I think it is not possible by checking the css class, as some other style may overwrite the styles of the class which has been assinged to that text.
Actually I want to know the browser assigned font-size to the text of the page, as we can do it in firebug on firefox.
Any help would be appreciated.
hi
i search for cours video or book or web tutorials to teach me how to build website
with php mysql css html
i need full project from A to Z
from the scratch
plz if any one know that tell me
When you're opening page in IE it downloads lots of files, including CSS, scripts, pictures, SWFs, etc. I need to develop small plugin which will monitor all these URLs and let's say save to file this list.
I need it in Delphi, but any example in any other programming languages will be really appreciated.
When I create a view different from index action (for example the action video/add) the page is without css and layout. For index action is everything ok. Any helps?
I'd like to learn PHP specifically for dealing with security vulnerabilities/exploits.
Could someone recommend a book?
I don't know if I need to learn HTML/CSS/XML/XHTML etc, do I have to learn those too? I don't really plan on designing websites, could anyone help me with this? :P
Hello,
I have a rather simple question but i can't seem to find an answer to it.
I want when i click on any place on web page a div is opened. how can i accomplish that CSS style.
Thanks.
any better way to write this ?
$(this).parent().parent().find(" dd ul").toggle();
update..
I am trying to create a dropdown using the script here
http://www.jankoatwarpspeed.com/post/2009/07/28/reinventing-drop-down-with-css-jquery.aspx
however the script works only for one instance of list and my code works good for multiple instances. Just curious if there is another better way to get parent of a parent in jQuery