Kym Andrew Walter, 25, of Kings Mill Lane in the town, is also charged with possessing a firearm, production of cannabis and abstracting electricity.
The incident happened on Springbank Road, in the early hours of Saturday.
Mr Walter was remanded in custody at the town's magistrates' court and is due at Leeds Crown Court on 27 October.

The Scottish government is to introduce standardised testing at four separate stages in a child's school life.
The Commission on School Reform warned that the assessments would give little beneficial information to teachers and parents.
First Minister Nicola Sturgeon believes improving school attainment is an important goal for her government.
In September, she said the tests in literacy and numeracy, which will be piloted next year and introduced in 2017, would provide reliable evidence of a child's progress but would not be the sole form of measurement.
The new report has been published by the commission which was established by think tank Reform Scotland and the Centre for Scottish Public Policy.
It examined the government's attainment plan, including the standardised assessments which would replace the various other systems used by different councils.
Pupils will be tested four times - in Primaries 1, 4 and 7 and again in S3 at secondary school.
The government hopes the assessments will provide better data to help drive up attainment in schools and close the gap between how well youngsters from relatively rich and poor backgrounds do.
It insisted the assessments did not mark the return of "high stakes national testing" which were abolished more than 10 years ago.
In its report, the commission said the tests could provide valuable information on how the education system was progressing and it stressed it was not opposed to the tests in principal.
However, it warned:
One concern of teaching unions was that data from the tests could be used by journalists, parents' groups and critics to produce league tables of school performance.
The report suggested data should only be available at a council-wide and national level and that school data could be excluded from Freedom of Information to prevent it become readily available.
Chairman of the commission, Keir Bloomer, said: "The government is right to try to improve the quality of information available about Scottish education.
"The commission supports much of what is proposed and has no objection in principle to the proposed National Standardised Assessment. However, it is a mistake to suggest that the assessment will provide much information of direct benefit to parents and teachers.
"The government should continue with its drive to introduce the assessment but it should change its emphasis to the gathering of local authority and national data as opposed to individual data.
"The Scottish government is setting out to improve standards and that is admirable. However, it needs to exercise care with how its proposed assessment is used."
Mr Bloomer is a former council director of education and played a part in shaping the development of Curriculum for Excellence. Other members include former Labour education minister Peter Peacock.
Scotland's largest teachers union, the EIS, said it was hopeful the Scottish government would still act on its concerns about the assessments.
General secretary Larry Flanagan said: "The EIS is engaged in a constructive dialogue with the Scottish government around the proposed National Improvement Framework.
"Whilst we will continue to resist any reforms which are predicated on high stakes testing and competition between schools, we have a shared agenda around closing the attainment gap and ensuring a high-quality learning experience for the young people in our schools.
"We have made a number of proposals, therefore, which would ensure that assessment supports teaching and learning and which also guard against an approach that would serve only to narrow pupils' learning, encourage teaching to the test and contribute to a damaging league-table agenda.
"We are hopeful that Scottish government has been persuaded by the educational rationale of our suggestions."
A Scottish government spokeswoman said the plan would see "for the first time" all schools using the same assessments tailored to Curriculum for Excellence.
She added: "This government has absolutely no intention of creating school league tables or of returning to the high-stakes testing regime of old.
"Since publishing the draft framework in September, we have consulted and engaged widely, reaching and listening carefully to the views of more than 5,000 children, young people, parents, teachers, educational professionals and academics."
A 25-year-old man has appeared in court charged with attempted murder after a gun was fired through the window of a house in Huddersfield.
[NEXT_CONCEPT]
Planned new assessments in schools need to be handled "carefully", according to a major report on Scottish education.